-
-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): don't inject bundlerInfo in library mode (#7567)
- Loading branch information
Showing
10 changed files
with
63 additions
and
6 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
packages/rspack-test-tools/tests/configCases/output/library-truthy/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
it('should not inject bundlerInfo when library is truthy', () => { | ||
const content = require('fs').readFileSync( | ||
require('path').resolve(__dirname, "bundle0.js"), | ||
"utf-8" | ||
); | ||
expect(content).not.toContain('__webpack_require__' + '.rv') | ||
}) |
8 changes: 8 additions & 0 deletions
8
packages/rspack-test-tools/tests/configCases/output/library-truthy/rspack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @type {import("@rspack/core").Configuration} */ | ||
module.exports = { | ||
output: { | ||
library: { | ||
type: 'modern-module' | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/rspack-test-tools/tests/configCases/output/library-undefined/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
it('should inject bundlerInfo when library is falsy', () => { | ||
const content = require('fs').readFileSync( | ||
require('path').resolve(__dirname, "bundle0.js"), | ||
"utf-8" | ||
); | ||
expect(content).toContain('__webpack_require__.rv') | ||
}) |
6 changes: 6 additions & 0 deletions
6
packages/rspack-test-tools/tests/configCases/output/library-undefined/rspack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import("@rspack/core").Configuration} */ | ||
module.exports = { | ||
output: { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ed5b33b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Ran ecosystem CI: Open
ed5b33b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Benchmark detail: Open
Threshold exceeded: ["10000_production-mode + exec"]