Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: respect
output.publicPath
for serve
- Loading branch information
1 parent
e3b7eae
commit 60c6e0a
Showing
9 changed files
with
242 additions
and
36 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
26 changes: 26 additions & 0 deletions
26
test/serve/basic/multi-dev-server-output-public-path.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,26 @@ | ||
const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); | ||
|
||
module.exports = [ | ||
{ | ||
name: 'one', | ||
mode: 'development', | ||
devtool: false, | ||
entry: './src/other.js', | ||
output: { | ||
filename: 'first-output/[name].js', | ||
}, | ||
}, | ||
{ | ||
name: 'two', | ||
mode: 'development', | ||
devtool: false, | ||
output: { | ||
publicPath: '/my-public-path/', | ||
filename: 'second-output/[name].js', | ||
}, | ||
devServer: { | ||
publicPath: '/dev-server-my-public-path/', | ||
}, | ||
plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], | ||
}, | ||
]; |
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,32 @@ | ||
const getPort = require('get-port'); | ||
|
||
const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); | ||
|
||
module.exports = async () => [ | ||
{ | ||
name: 'one', | ||
mode: 'development', | ||
devtool: false, | ||
output: { | ||
filename: 'first-output/[name].js', | ||
}, | ||
devServer: { | ||
port: await getPort(), | ||
publicPath: '/one-dev-server-my-public-path/', | ||
}, | ||
plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], | ||
}, | ||
{ | ||
name: 'two', | ||
mode: 'development', | ||
devtool: false, | ||
entry: './src/other.js', | ||
output: { | ||
filename: 'second-output/[name].js', | ||
}, | ||
devServer: { | ||
port: await getPort(), | ||
publicPath: '/two-dev-server-my-public-path/', | ||
}, | ||
}, | ||
]; |
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,23 @@ | ||
const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); | ||
|
||
module.exports = [ | ||
{ | ||
name: 'one', | ||
mode: 'development', | ||
devtool: false, | ||
output: { | ||
publicPath: '/my-public-path/', | ||
filename: 'first-output/[name].js', | ||
}, | ||
plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], | ||
}, | ||
{ | ||
name: 'two', | ||
mode: 'development', | ||
devtool: false, | ||
entry: './src/other.js', | ||
output: { | ||
filename: 'second-output/[name].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,25 @@ | ||
const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); | ||
|
||
module.exports = [ | ||
{ | ||
name: 'one', | ||
mode: 'development', | ||
devtool: false, | ||
output: { | ||
filename: 'first-output/[name].js', | ||
}, | ||
devServer: { | ||
publicPath: '/dev-server-my-public-path/', | ||
}, | ||
plugins: [new WebpackCLITestPlugin(['mode', 'output'], false, 'hooks.compilation.taps')], | ||
}, | ||
{ | ||
name: 'two', | ||
mode: 'development', | ||
devtool: false, | ||
entry: './src/other.js', | ||
output: { | ||
filename: 'second-output/[name].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,29 @@ | ||
const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); | ||
|
||
module.exports = [ | ||
{ | ||
name: 'one', | ||
mode: 'development', | ||
devtool: false, | ||
output: { | ||
filename: 'first-output/[name].js', | ||
}, | ||
devServer: { | ||
publicPath: '/dev-server-my-public-path/', | ||
}, | ||
plugins: [new WebpackCLITestPlugin(['mode', 'output'], false)], | ||
}, | ||
{ | ||
name: 'two', | ||
mode: 'development', | ||
devtool: false, | ||
entry: './src/other.js', | ||
output: { | ||
filename: 'first-output/[name].js', | ||
}, | ||
devServer: { | ||
publicPath: '/dev-server-my-public-path/', | ||
}, | ||
plugins: [new WebpackCLITestPlugin(['mode', 'output'], false)], | ||
}, | ||
]; |
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 @@ | ||
console.log('HERE'); |