Closed bolechen closed 5 years ago
Please share webpack.mix.js
file.
let mix = require('laravel-mix');
require('laravel-mix-sass-resources-loader')
// require('laravel-mix-purgecss')
require('laravel-mix-versionhash')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/assets/js/app.js', 'public/js').extract(['vue'])
.sass('resources/assets/sass/app.scss', 'public/css')
.sass('resources/assets/sass/admin.scss', 'public/css')
.disableNotifications();
//全局样式
mix.sassResources('resources/assets/sass/variables.scss');
if (mix.inProduction()) {
// mix.purgeCss();
mix.versionHash();
} else {
mix.sourceMaps();
}
mix.webpackConfig({
plugins: [
// new BundleAnalyzerPlugin(),
],
output: {
publicPath: '/',
chunkFilename: 'js/[name].[chunkhash].js',
},
});
mix.options({
processCssUrls: true,
purifyCss: true,
extractVueStyles: false,
imgLoaderOptions: {
enabled: false
},
postCss: [
// require('postcss-pxtorem')({rootValue: 16, propList: ['*'] }),
],
uglify: {
uglifyOptions: {
compress: {
drop_console: true,
drop_debugger: true
}
}
}
});
when I commented this lines, it seems ok, thx
And what is your laravel-mix
version?
when I use
and my css code:
when build done,the css for iPhoneX is gone