-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into npm/lazy-loader-plugin
- Loading branch information
Showing
8 changed files
with
79 additions
and
22 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
17 changes: 17 additions & 0 deletions
17
npm/webpack-dev-server/__snapshots__/makeWebpackConfig.spec.ts.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 @@ | ||
exports['makeWebpackConfig ignores userland webpack `output.publicPath` 1'] = { | ||
"output": { | ||
"publicPath": "/test-public-path/", | ||
"filename": "[name].js" | ||
}, | ||
"mode": "development", | ||
"optimization": { | ||
"splitChunks": { | ||
"chunks": "all" | ||
} | ||
}, | ||
"plugins": [ | ||
"HtmlWebpackPlugin", | ||
"CypressCTOptionsPlugin", | ||
"LazyCompilePlugin" | ||
] | ||
} |
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
31 changes: 31 additions & 0 deletions
31
npm/webpack-dev-server/test/unit/makeWebpackConfig.spec.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,31 @@ | ||
import { expect } from 'chai' | ||
import snapshot from 'snap-shot-it' | ||
import { makeWebpackConfig } from '../../src/makeWebpackConfig' | ||
|
||
describe('makeWebpackConfig', () => { | ||
it('ignores userland webpack `output.publicPath`', async () => { | ||
const actual = await makeWebpackConfig({ | ||
output: { | ||
publicPath: '/this-will-be-ignored', | ||
}, | ||
}, { | ||
devServerPublicPathRoute: '/test-public-path', | ||
isOpenMode: true, | ||
supportFile: '/support.js', | ||
projectRoot: '.', | ||
files: [], | ||
}) | ||
|
||
// plugins contain circular deps which cannot be serialized in a snapshot. | ||
// instead just compare the name and order of the plugins. | ||
// @ts-expect-error | ||
actual.plugins = actual.plugins.map((p) => p.constructor.name) | ||
|
||
// these will include paths from the user's local file system, so we should not include them the snapshot | ||
delete actual.output.path | ||
delete actual.entry | ||
|
||
expect(actual.output.publicPath).to.eq('/test-public-path/') | ||
snapshot(actual) | ||
}) | ||
}) |
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 |
---|---|---|
|
@@ -19133,7 +19133,7 @@ [email protected]: | |
tapable "^1.1.0" | ||
util.promisify "1.0.0" | ||
|
||
html-webpack-plugin@^4.5.0: | ||
html-webpack-plugin@^4.0.0, html-webpack-plugin@^4.5.0: | ||
version "4.5.2" | ||
resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.5.2.tgz#76fc83fa1a0f12dd5f7da0404a54e2699666bc12" | ||
integrity sha512-q5oYdzjKUIPQVjOosjgvCHQOv9Ett9CYYHlgvJeXG0qQvdSojnBq4vAdQBwn1+yGveAwHCoe/rMR86ozX3+c2A== | ||
|