-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Decrease webpack aggregate timeout for ComponentThemeLiveReload…
…IT (#12945) On deletion of parent theme component css, webpack compilation frequently fails due to an unexpected change notification for theme-app-theme.generated.js (together with the file deletion) that prevents theme regeneration. Decreasing aggregate timeout seems to prevent that situation.
- Loading branch information
1 parent
4423980
commit 719a8a6
Showing
2 changed files
with
50 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
42 changes: 42 additions & 0 deletions
42
flow-tests/test-application-theme/test-theme-component-live-reload/webpack.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,42 @@ | ||
/** | ||
* This file contains project specific customizations for the webpack build. | ||
* It is autogenerated if it didn't exist or if it was made for an older | ||
* incompatible version. | ||
* | ||
* Defaults are provided in an autogenerated webpack.generated.js file and used by this file. | ||
* The webpack.generated.js file is overwritten on each build and no customization can be done there. | ||
*/ | ||
const merge = require('webpack-merge'); | ||
const flowDefaults = require('./webpack.generated.js'); | ||
|
||
/** | ||
* To change the webpack config, add a new configuration object in | ||
* the merge arguments below: | ||
*/ | ||
module.exports = merge(flowDefaults, | ||
// Decrease aggregate timeout to avoid random duplicated | ||
// theme-app-theme.generated.js file changes notification | ||
// that makes compilation fail when deleting parent theme component css. | ||
// see https://github.com/vaadin/flow/issues/11928#issuecomment-1031146480 | ||
{ | ||
watchOptions: { | ||
aggregateTimeout: 5 | ||
} | ||
} | ||
// Override default configuration | ||
// { | ||
// mode: 'development', | ||
// devtool: 'inline-source-map', | ||
// }, | ||
|
||
// Add a custom plugin | ||
// (install the plugin with `npm install --save-dev webpack-bundle-analyzer`) | ||
// { | ||
// plugins: [ | ||
// new require('webpack-bundle-analyzer').BundleAnalyzerPlugin({ | ||
// analyzerMode: 'static' | ||
// }) | ||
// ] | ||
// }, | ||
); | ||
|