Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path');
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
- module.exports = function (env, argv) {
- const isProduction = argv.mode === "production"
- const plugins = [];
- plugins.push(
- new MiniCssExtractPlugin({
- filename: 'style.css',
- ignoreOrder: false
- })
- )
- return {
- entry: {
- script: path.resolve(__dirname, 'src/index.js')
- },
- output: {
- path: path.resolve(__dirname, 'dist'),
- filename: '[name].js'
- },
- plugins,
- module: {
- rules: [
- {
- test: /\.less$/,
- use: [
- { loader: MiniCssExtractPlugin.loader },
- 'css-loader',
- 'clean-css-loader',
- 'less-loader'
- ]
- }
- ]
- }
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement