Skip to content

Commit

Permalink
chore: test case
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Dec 12, 2024
1 parent 6f39872 commit 9327c5b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class Plugin {
apply(compiler) {
compiler.hooks.compilation.tap("Test", compilation => {
compilation.hooks.processAssets.tap("Test", () => {
const module = Array.from(compilation.modules)[0];
const moduleId = compilation.chunkGraph.getModuleId(module);
expect(moduleId).toBeTruthy();
});
});
}
}

/** @type {import("@rspack/core").Configuration} */
module.exports = {
target: 'web',
node: false,
entry: {
main: "./index.js"
},
output: {
filename: "[name].js"
},
optimization: {
sideEffects: false,
},
plugins: [
new Plugin()
]
};

0 comments on commit 9327c5b

Please sign in to comment.