Closed markbrouch closed 5 years ago
Side note - why are css map files being uploaded at all? Is there a way to prevent this?
why are css map files being uploaded at all?
Interesting question! We simply didn't make a conscious choice to exclude them. It's conceivable that errors could originate in a CSS file. However, I've found no examples of this kind, so perhaps we should consider ignoring them.
Can you provide more steps to reproduce, as the overwrite
does works for the examples I have tried. Thanks!
I wish I could give you steps to reproduce, but unfortunately our application config is very complex. We have a SSR Vue application with Sass compilation. Here's the relevant portion of the style loaders:
module: {
rules: [
{
test: /\.(sass|scss)$/,
use: [
{
loader: 'style-loader/useable',
},
{
loader: 'css-loader', // translates CSS into CommonJS
options: { minimize: minimizeCSS },
},
{
loader: 'resolve-url-loader',
},
{
loader: 'sass-loader?sourceMap', // compiles Sass to CSS
},
],
},
{
test: /\.css$/,
use: [
{
loader: 'style-loader/useable',
},
{
loader: 'css-loader', // translates CSS into CommonJS
options: { minimize: minimizeCSS },
},
{
loader: 'resolve-url-loader',
},
],
},
],
},
I was thinking it might be a good feature to add in the plugin options to configure which files to upload via a regex pattern, that way I could specify something like /.*\.js\.map$/
so that only js map files get uploaded.
It looks like when using the upload webpack plugin, the
overwrite
command is not respected for css map files. (js map files are overwritten as expected).