Closed jellycode closed 6 years ago
btw aint there away to directly use ExtractTextPlugin
?
new ExtractTextPlugin("[name]-[contenthash].css"),
same as we do with js aka without a loop
I did tried a few ways, saw the webpackPlugins function and tried to add it there, but it seems mix adds in a ExtractTextPlugin and Vue will add one as well, and when I add one there are three in there...couldn't figure out how to tell it to use my new one with the updated filename setting instead of one of the other two. I think the 'proper' way to do it would be to add a new ExtractTextPlugin with the new settings and force mix to use it, just wasn't sure how?
Great work by the way, this is a great start!
okay, np, thanx for ur help :+1:
i've just tested the new logic for css and there are a couple of issues
mix-manifest.json
Ok, here is my webpack.mix.js
require('laravel-mix-versionhash');
let mix = require('laravel-mix');
if (mix.inProduction()) {
mix.versionHash();
}
if (!Mix.isUsing('hmr')) {
mix.sass('resources/assets/sass/app.scss', 'public/css');
}
mix
.js('resources/assets/js/app.js', 'public/js').extract(['vue']);
I'm using laravel-mix@2.1.11
am using same version for mix but different output path for assets public/assets/...
I see the issue now, working on it...
Check each instance of ExtractTextPlugin and change the filename attribute to a contenthash hashed name. Contenthash is used for CSS files in ExtractTextPlugin.