-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: should create an empty codegen result for module that has failur…
…e in codegen (#7777) fix: parse error in concatenatedModule should be emitted to diagnostics
- Loading branch information
Showing
6 changed files
with
74 additions
and
32 deletions.
There are no files selected for viewing
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
2 changes: 2 additions & 0 deletions
2
...ack-test-tools/tests/diagnosticsCases/module-parse-failed/concatenate_parse_module/foo.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,2 @@ | ||
console.log(DEFINE_VAR) | ||
export default 1 |
3 changes: 3 additions & 0 deletions
3
...k-test-tools/tests/diagnosticsCases/module-parse-failed/concatenate_parse_module/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,3 @@ | ||
import v from './foo' | ||
|
||
console.log(v) |
13 changes: 13 additions & 0 deletions
13
...ools/tests/diagnosticsCases/module-parse-failed/concatenate_parse_module/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,13 @@ | ||
const rspack = require('@rspack/core') | ||
|
||
/** @type {import('@rspack/core').Configuration} */ | ||
module.exports = { | ||
plugins: [ | ||
new rspack.DefinePlugin({ | ||
DEFINE_VAR: '1 2 3' | ||
}) | ||
], | ||
optimization: { | ||
concatenateModules: true | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...-test-tools/tests/diagnosticsCases/module-parse-failed/concatenate_parse_module/stats.err
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 @@ | ||
ERROR in ./index.js + 1 modules | ||
× JavaScript parsing error: | ||
│ : Expected ',', got 'numeric literal (2, 2)' | ||
╭─[1:14] | ||
1 │ console.log(1 2 3) | ||
· ─ | ||
2 │ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (1); | ||
╰──── |
e32e58b
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
e32e58b
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