Skip to content

Commit

Permalink
test(config): support pass false to plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
puppet-666 committed Dec 8, 2023
1 parent e47e8ea commit c4dac9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/rspack/tests/configCases/plugins/issue-4949/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it("pass false to plugins", function () {
expect(STRING).toBe(undefined);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const rspack = require("@rspack/core");

/** @type {import("../../../../src/index").RspackOptions} */
module.exports = {
plugins: [
false && new rspack.DefinePlugin({
STRING: '"string"',
})
]
};

0 comments on commit c4dac9c

Please sign in to comment.