-
-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: regression for custom configurations (#3834)
- Loading branch information
1 parent
14b9c18
commit bb4f8eb
Showing
11 changed files
with
1,059 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// eslint-disable-next-line node/no-unpublished-require | ||
const { run } = require("../../../utils/test-utils"); | ||
|
||
describe("webpack cli", () => { | ||
it("should support mjs config format", async () => { | ||
const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "webpack.config.babel.js"]); | ||
|
||
console.log(stderr); | ||
|
||
expect(exitCode).toBe(0); | ||
expect(stderr).toBeFalsy(); | ||
expect(stdout).toBeTruthy(); | ||
}); | ||
}); |
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("You know who"); |
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,5 @@ | ||
{ | ||
"engines": { | ||
"node": ">=14.15.0" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
test/build/config-format/babel-commonjs/webpack.config.babel.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,10 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
mode: "development", | ||
entry: "./main.js", | ||
output: { | ||
path: path.resolve(__dirname, "dist"), | ||
filename: "foo.bundle.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,12 @@ | ||
// eslint-disable-next-line node/no-unpublished-require | ||
const { run } = require("../../../utils/test-utils"); | ||
|
||
describe("webpack cli", () => { | ||
it("should support mjs config format", async () => { | ||
const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "webpack.config.babel.js"]); | ||
|
||
expect(exitCode).toBe(0); | ||
expect(stderr).toBeFalsy(); | ||
expect(stdout).toBeTruthy(); | ||
}); | ||
}); |
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("You know who"); |
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": "module", | ||
"engines": { | ||
"node": ">=14.15.0" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
test/build/config-format/babel-esm/webpack.config.babel.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,12 @@ | ||
/* eslint-disable */ | ||
import { fileURLToPath } from "url"; | ||
import path from "path"; | ||
|
||
export default { | ||
mode: "development", | ||
entry: "./main.js", | ||
output: { | ||
path: path.resolve(path.dirname(fileURLToPath(import.meta.url)), "dist"), | ||
filename: "foo.bundle.js", | ||
}, | ||
}; |