Closed fivemru closed 3 years ago
I would expect this to be specified in Rollup's output.entryFileNames
and then all plugins should use that instead of needing to specify it on a per-plugin basis
I would expect this to be specified in Rollup's
output.entryFileNames
and then all plugins should use that instead of needing to specify it on a per-plugin basis
The point is that config.client.output()
contains the .js extension in the entryFileNames and chunkFileNames fields. https://github.com/sveltejs/sapper/blob/3c01d9300839358e01387c388527f3ec14b0e35b/src/config/rollup.ts#L20
Just replace .js with .css I think it will not be completely predictable behavior.
Now the css file names are completely dependent on the defaults in rollup-plugin-css-chunks, due to their change in version 2.0.0 this bug occurred.
As noted at https://github.com/sveltejs/sapper/blob/3003e980a3cc1db233409a95e9559537e0b2cce8/src/core/create_compilers/RollupCompiler.ts#L163 it is most likely correct to put this in an external plugin.
This pull request simply restores the behavior of version 0.28.10.
Please release.
Explicitly use hash in rollup-plugin-css-chunks:
fix #1716
Before submitting the PR, please make sure you do the following
Tests
npm test
and lint the project withnpm run lint