Webpack5 and production

I'm using Tailwind, vanilla js and webpack 5 - I was just wondering what different config settings I should be adding to my webpack.prod.js? I used to use different file compression, and minify css, but with Tailwind/postcss I'm using nanocss and webpack 5 now marks images as type: 'asset/resource' so I don't use the loader I would have compressed the files with. I assume it's doing the work in the background. My prod config literally just looks like this:
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');

module.exports = merge(common, {
mode: 'production',
});
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');

module.exports = merge(common, {
mode: 'production',
});
šŸ˜† Webpack's docs on production seem to talk about TerserWebpackPlugin, but again, the suggestion seems to be that it comes pre-configured.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server