Closed ixkaito closed 5 years ago
Is there way to get webpack not to neaten up my js until it's in production mode/build?
@Nsokyi Inside of the frasco.config.js
you can set the tasks
for webpack
to false
.
tasks: {
browsersync: true,
eslint: true,
imagemin: true,
sass: true,
watch: true,
webpack: false,
},
Thanks, I tried that and oddly enough it doesn't have any effect?
@Nsokyi If you set webpack
to false
, webpack will not do anything, so you have to directly edit your js files in the assets/js
folder. Note: if you reset webpack
to true
, your js files in assets/js
will be overwritten by files with the same name in assets/_js
.
I'm sorry that for now, there's no way to switch minification between development and production.
OK, thanks for getting back to me.
@Nsokyi On the latest release, I removed gulp-uglify
because Webpack automaticlly compress js files. For now, you can add a Webpack configuration devtool: 'source-map'
to frasco.config.js to enable source maps. This might make your debug easier.
webpack: {
mode: 'production',
devtool: 'source-map',
module: {
rules: [],
},
},
webpack v4+ will minify your code by default in production mode.