diff --git a/lib/webpack/shared.cjs b/lib/webpack/shared.cjs --- a/lib/webpack/shared.cjs +++ b/lib/webpack/shared.cjs @@ -1,3 +1,4 @@ +const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); @@ -102,6 +103,7 @@ BROWSER: true, }, }), + new VanillaExtractPlugin(), new MiniCssExtractPlugin({ filename: 'prod.[contenthash:12].build.css', }), @@ -139,10 +141,12 @@ cssExtractLoader, { ...cssLoader, + sideEffects: true, options: { ...cssLoader.options, url: false, - modules: false, + modules: true, + sourceMap: true, }, }, ],