Skip to content

Commit

Permalink
feat(rspack): support enforce
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jun 3, 2023
1 parent bb2444b commit 856b073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Currently supports:

| Hook | Rollup | Vite | Webpack 4 | Webpack 5 | esbuild | Rspack |
| ----------------------------------------------------------------------- | :-------------: | :--: | :-------: | :-------: | :-------------: | :----: |
| [`enforce`](https://rollupjs.org/guide/en/#enforce) | ❌ <sup>1</sup> |||| ❌ <sup>1</sup> | |
| [`enforce`](https://rollupjs.org/guide/en/#enforce) | ❌ <sup>1</sup> |||| ❌ <sup>1</sup> | |
| [`buildStart`](https://rollupjs.org/guide/en/#buildstart) |||||||
| [`resolveId`](https://rollupjs.org/guide/en/#resolveid) |||||||
| `loadInclude`<sup>2</sup> |||||||
Expand Down
2 changes: 2 additions & 0 deletions src/rspack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function getRspackPlugin<UserOptions = {}>(
}

compiler.options.module.rules.unshift({
enforce: plugin.enforce,
include: /.*/,
use,
})
Expand All @@ -52,6 +53,7 @@ export function getRspackPlugin<UserOptions = {}>(
options: { plugin },
}
compiler.options.module.rules.unshift({
enforce: plugin.enforce,
include: /.*/,
use,
})
Expand Down

0 comments on commit 856b073

Please sign in to comment.