Comments (2)
@faceyspacey, @ScriptedAlchemy , it seems to be the same issue like the one mentioned in #61
Initial fix for #61 includes takes into consideration first argument passed to _createApiWithCss2
, while the second one keeps possibly duplicated.
I was able to replicate the issue on next setup:
"babel-plugin-universal-import": "^3.0.3",
"react-universal-component": "^3.0.3",
"webpack-flush-chunks": "^2.0.1",
"extract-css-chunks-webpack-plugin": "^3.0.11",
with stats file generated with
"webpack-stats-plugin": "^0.2.1",
optimization: {
splitChunks: {
chunks: 'async', // async, initial, all
minSize: 30000,
minChunks: 1,
maxInitialRequests: 5,
maxAsyncRequests: 3,
automaticNameDelimiter: CHUNKS_NAME_DELIMITER,
name: false,
cacheGroups: {
app: {
test: /[\\/]@app-common[\\/]/,
name: 'app',
},
cells: {
test: /[\\/]@cells[\\/]/,
name: 'cells',
},
common: {
test: /[\\/]@common[\\/]/,
name: 'common',
},
utils: {
test: /[\\/]@utils[\\/]/,
name: 'utils',
},
vendors: {
test: /[\\/]@node_modules[\\/]/,
name: 'vendor',
priority: -20,
}
},
},
},
Quick check with adding isUnique call for second argument passed to _createApiWithCss2 in compiled code seems to solve the issue.
// node_modules/webpack-flush-chunks/dist/flushChunks.js:25
return (0, _createApiWithCss2.default)([].concat(_toConsumableArray(jsBefore), _toConsumableArray(files), _toConsumableArray(jsAfter)).filter(isUnique), [].concat(_toConsumableArray(jsBefore), _toConsumableArray(jsAfter.reverse()), _toConsumableArray(files)).filter(isUnique), stats, opts.outputPath);
before adding:
<link rel='stylesheet' href='/css/chunks/common.90e728aa3054798fe428.css' />
<link rel='stylesheet' href='/css/chunks/app.0686eedf7cedb804bc00.css' />
<link rel='stylesheet' href='/css/main.ccfbbfe1ef5f990ca905.css' />
<link rel='stylesheet' href='/css/chunks/common.90e728aa3054798fe428.css' />
<link rel='stylesheet' href='/css/chunks/app.0686eedf7cedb804bc00.css' />
<link rel='stylesheet' href='/css/chunks/app.0686eedf7cedb804bc00.css' />
<link rel='stylesheet' href='/css/chunks/common.90e728aa3054798fe428.css' />
<link rel='stylesheet' href='/css/chunks/landing.container.c5b76b8c18b56e0d3d70.css' />
and after adding:
<link rel='stylesheet' href='/css/chunks/common.28157dcd2e468c7f4494.css' />
<link rel='stylesheet' href='/css/chunks/app.3bc735b9f7b1db77a218.css' />
<link rel='stylesheet' href='/css/main.a032936feb332b73b7a6.css' />
<link rel='stylesheet' href='/css/chunks/landing.container.c5b76b8c18b56e0d3d70.css' />
from webpack-flush-chunks.
@swernerx, GH-73 was merged into 2.0.2 version, could you double check from your side if issue has been fixed?
from webpack-flush-chunks.
Related Issues (20)
- webpack v5: missing dynamic chunks generated by `splitChunks` when chunk IDs are strings
- flushChunkNames is empty
- utils.js:50 chunk not available for synchronous require yet:
- Not work with webpack.NamedChunksPlugin or webpack-hashed-chunkids
- reference script file outside of webpack build
- Breaking changes between v1 and v2
- [FLUSH CHUNKS]: Unable to find pages-Home in Webpack chunks. Please check usage of Babel plugin. HOT 19
- Chunk dependencies not flushed when it's moved to a parent
- Questions about flushing and babel plugin
- t
- flushChunks not returns shared css between modules HOT 1
- 2.0.3 tag is missing from GitHub
- Removing LimitChunkCountPlugin: 1 for server HOT 3
- Pass through renderProps in the Component return API
- Raw CSS on development environment
- [FLUSH CHUNKS] warning with TSX, but not with JS
- @loadable/components support
- 52 Vulnerabilities in NPM modules
- [FLUSH CHUNKS]: Unable to find pages-Landing in Webpack chunks. Please check usage of Babel plugin.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-flush-chunks.