diff --git a/@plotly/webpack-dash-dynamic-import/package.json b/@plotly/webpack-dash-dynamic-import/package.json index f90e00d8dc..0d23122118 100644 --- a/@plotly/webpack-dash-dynamic-import/package.json +++ b/@plotly/webpack-dash-dynamic-import/package.json @@ -1,6 +1,6 @@ { "name": "@plotly/webpack-dash-dynamic-import", - "version": "1.2.0", + "version": "1.3.0", "description": "Webpack Plugin for Dynamic Import in Dash", "repository": { "type": "git", diff --git a/@plotly/webpack-dash-dynamic-import/src/index.js b/@plotly/webpack-dash-dynamic-import/src/index.js index 490e66b904..85d8388301 100644 --- a/@plotly/webpack-dash-dynamic-import/src/index.js +++ b/@plotly/webpack-dash-dynamic-import/src/index.js @@ -78,6 +78,10 @@ class WebpackDashDynamicImport { apply(compiler) { compiler.hooks.compilation.tap('WebpackDashDynamicImport', compilation => { compilation.mainTemplate.hooks.requireExtensions.tap('WebpackDashDynamicImport > RequireExtensions', (source, chunk, hash) => { + // Prevent CSS chunks having JS appended + if (chunk.name === 'mini-css-extract-plugin') { + return source; + } return source + resolveImportSource(); }); });