webpack-dash-dynamic-import: Don't add JS to chunks created by mini-css-extract-plugin#1855
webpack-dash-dynamic-import: Don't add JS to chunks created by mini-css-extract-plugin#1855ryanand26 wants to merge 3 commits intoplotly:masterfrom
Conversation
…o the those that are generated via mini-css-extract-plugin.
…be backwards compatible.
|
Nice one @ryanand26. This appears to be what stopped me in plotly/dash-core-components#753 (comment) a couple of years ago when I did a quick draft PR on separating CSS on production build for Solving the small issue addressed in this PR is a step towards also solving plotly/dash-core-components#752. |
|
Thanks @ryanand26 - this looks great. The test failures worry me, they don't seem related to your changes but if you're up for investigating please do - that's clearly a much bigger scope than the intent of this PR, it's just that it may take some time before Plotly folks find time to dig in. The ones I'm specifically worried about are these ones below - as if the latest Chrome/Chromedriver updates broke something, or something changed in Selenium? 😱 We can certainly try just running the tests again (ie give it an empty commit - unfortunately just rerunning on CircleCI doesn't work well in this project) but these particular ones look likely to be repeatable: |
…elenium tests on build server
|
Hey Alex, I pushed another commit but looks like it's getting the same failures. It's been a long long time since I had to debug selenium so not really the right person to help out with that. No rush from me on having this published. As it's only a little block of code I can have in the local repo and imported into webpack.config.js from there until Plotly take a look. |
|
Closing in favor of #1858 |
While using the dash-component-boilerplate I was trying to extract my CSS in a separate file but was facing issues as this plugin adds additional content.
The plugin assumes that all chunks are JS chunks but when using mini-css-extract-plugin this isn't the case.
Fortunately mini-css-extract-plugin always names it's chunks the same so this if allowed me to avoid adding that content for this case. There are more involved ways to check the type of the import though so no worries if this doesn't pass muster with you all.
Contributor Checklist