-
-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #728 from lakatostamas/fix/bin-extensions
fix(bin): extension detection (#724)
- Loading branch information
Showing
11 changed files
with
107 additions
and
3 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
{ | ||
"presets": ["env"] | ||
} |
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 @@ | ||
module.exports = "webpack-babel-config"; |
17 changes: 17 additions & 0 deletions
17
test/binCases/config-location/webpack-babel-config/webpack-babel-config.test.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,17 @@ | ||
"use strict"; | ||
|
||
const { run } = require("../../../testUtils"); | ||
|
||
test("webpack-babel-config", () => { | ||
const { code, stdout, stderr } = run(__dirname, [ | ||
"--output-filename", | ||
"[name].js", | ||
"--output-chunk-filename", | ||
"[id].chunk.js", | ||
"--target", | ||
"async-node", | ||
]); | ||
expect(code).toBe(0); | ||
expect(stdout).toContain("./index2.js"); | ||
expect(stderr).toHaveLength(0); | ||
}); |
9 changes: 9 additions & 0 deletions
9
test/binCases/config-location/webpack-babel-config/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,9 @@ | ||
// eslint-disable-next-line node/no-unsupported-features, node/no-unsupported-features/es-syntax | ||
import path from "path"; | ||
|
||
const config = { | ||
entry: path.resolve(__dirname, "./index2") | ||
}; | ||
|
||
// eslint-disable-next-line node/no-unsupported-features, node/no-unsupported-features/es-syntax | ||
export default config; |
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 @@ | ||
module.exports = "webpack-ts-config"; |
5 changes: 5 additions & 0 deletions
5
test/binCases/config-location/webpack-ts-config/tsconfig.json
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
test/binCases/config-location/webpack-ts-config/webpack-ts-config.test.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,17 @@ | ||
"use strict"; | ||
|
||
const { run } = require("../../../testUtils"); | ||
|
||
test("webpack-ts-config", () => { | ||
const { code, stdout, stderr } = run(__dirname, [ | ||
"--output-filename", | ||
"[name].js", | ||
"--output-chunk-filename", | ||
"[id].chunk.js", | ||
"--target", | ||
"async-node", | ||
]); | ||
expect(code).toBe(0); | ||
expect(stdout).toContain("./index2.js"); | ||
expect(stderr).toHaveLength(0); | ||
}); |
8 changes: 8 additions & 0 deletions
8
test/binCases/config-location/webpack-ts-config/webpack.config.ts
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 @@ | ||
import path from "path"; | ||
import webpack from "webpack"; | ||
|
||
const config: webpack.Configuration = { | ||
entry: path.resolve(__dirname, "./index2"), | ||
}; | ||
|
||
export default config; |