-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: error message for missing default export in configuration (#3685)
- Loading branch information
1 parent
f642f8d
commit e0a4a09
Showing
3 changed files
with
22 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const { run } = require("../../../utils/test-utils"); | ||
|
||
describe("webpack cli", () => { | ||
it("should support mjs config format", async () => { | ||
const { exitCode, stderr } = await run(__dirname, ["-c", "webpack.config.mjs"], { | ||
env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true }, | ||
}); | ||
|
||
if (/Error: Not supported/.test(stderr)) { | ||
expect(exitCode).toBe(2); | ||
} else { | ||
expect(exitCode).toBe(2); | ||
expect(stderr).toMatch(/Unable to find default export./); | ||
} | ||
}); | ||
}); |
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 @@ | ||
export let config = {}; |