-
-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/webpack/output-clean
- Loading branch information
Showing
18 changed files
with
53 additions
and
11 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
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
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
3 changes: 3 additions & 0 deletions
3
...test-tools/tests/diagnosticsCases/module-build-failed/loader-import-syntax-error/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 @@ | ||
it("should compile", (done) => { | ||
done() | ||
}); |
11 changes: 11 additions & 0 deletions
11
...est-tools/tests/diagnosticsCases/module-build-failed/loader-import-syntax-error/loader.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,11 @@ | ||
/** @type {import("../../../../dist").PitchLoaderDefinitionFunction} */ | ||
module.exports = async function () { | ||
try { | ||
const result = await this.importModule("./syntax-error.js"); | ||
|
||
// here should be unreachable | ||
expect(result).toBe(Symbol('unreachable')); | ||
} catch (e) { | ||
expect(e).toBeDefined() | ||
} | ||
}; |
13 changes: 13 additions & 0 deletions
13
...ls/tests/diagnosticsCases/module-build-failed/loader-import-syntax-error/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 @@ | ||
/** @type {import("@rspack/core").Configuration} */ | ||
module.exports = { | ||
entry: "./index.js", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /index\.js/, | ||
loader: "./loader", | ||
options: {} | ||
} | ||
] | ||
}, | ||
}; |
12 changes: 12 additions & 0 deletions
12
...est-tools/tests/diagnosticsCases/module-build-failed/loader-import-syntax-error/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,12 @@ | ||
ERROR in ./index.js | ||
× Module build failed: | ||
╰─▶ × Final loader(<PROJECT_ROOT>/tests/diagnosticsCases/module-build-failed/loader-import-syntax-error/loader.js??ruleSet[1].rules[0].use[0]) didn't return a Buffer or String | ||
|
||
ERROR in × Module parse failed: | ||
╰─▶ × JavaScript parsing error: Unexpected eof | ||
╭──── | ||
1 │ console.log( | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. |
1 change: 1 addition & 0 deletions
1
...ols/tests/diagnosticsCases/module-build-failed/loader-import-syntax-error/syntax-error.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 @@ | ||
console.log( |
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