webpack.dll.indexcss.config.js 741 Bytes
const webpack = require('webpack');
const path = require('path');
const {cssLoader} = require('./utils.js');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

let webpackConfig = {
    entry: {
        index: [path.join(__dirname, '../scss/index.css')]
    },
    output: {
        path: path.join(__dirname, './dll'), // absolute path
        filename: '[name].js'
    },
    module: {
        rules: [{
            test: /\.css$/,
            use: cssLoader('pro', 'css')
        }]
    },
    plugins: [
        new ExtractTextPlugin('[name].css'),
        new webpack.DefinePlugin({
            'process.env': {
                NODE_ENV: '"production"'
            }
        })
    ]
};

module.exports = webpackConfig;