I'm using Laravel Mix, and when I run npm run dev
, everything is good, but when I run npm run prod
, in minified style.css, all @import url()
s get deleted!
Webpack
const mix = require('laravel-mix');
mix.setPublicPath('public');
if (mix.inProduction()) {
mix.version();
}
I have no settings, and I use mix.styles([sources, dist])
to manage my pure CSS style files. In one of my sources, I have something like the following.
@import url(../../dist/icons/font-awesome/css/fontawesome-all.css);
However, when I minify them, all @imports are gone! Is there any setting or something? Is resolve-url-loader
a package to manage the kind of such things? If yes, would you please make an excellent example of using it?