@@ -104,6 +140,24 @@ module.exports = {
diff --git a/docs/documentation/customize/with-webpack.html b/docs/documentation/customize/with-webpack.html index 4a0df82e..e078e7c7 100644 --- a/docs/documentation/customize/with-webpack.html +++ b/docs/documentation/customize/with-webpack.html @@ -86,6 +86,42 @@ module.exports = { }; {% endcapture %} +{% capture configv4 %} +const path = require('path'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin') + +module.exports = { + entry: './src/index.js', + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'js/bundle.js' + }, + module: { + rules: [{ + test: /\.scss$/, + use: [ + MiniCssExtractPlugin.loader, + { + loader: 'css-loader' + }, + { + loader: 'sass-loader', + options: { + sourceMap: true, + // options... + } + } + ] + }] + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: css/[name].bundle.css' + }), + ] +}; +{% endcapture %} + {% capture step_3 %}
@@ -104,6 +140,24 @@ module.exports = {
+ Create a webpack.config.js file:
+
+ This setup takes the src folder as input, and outputs in the dist folder.
+