1234567891011121314151617181920212223242526272829303132333435363738 |
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const paths = require('../utils/paths');
- module.exports = env => ({
- devtool: 'cheap-eval-source-map',
- output: {
- filename: '[name].js',
- },
- module: {
- rules: [
- {
- test: /\.css$/,
- use: ['style-loader', 'css-loader', 'postcss-loader'],
- },
- {
- test: /\.scss$/,
- use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
- },
- ],
- },
- plugins: [
- new HtmlWebpackPlugin({
- template: './index.html',
- }),
- ],
- devServer: {
- contentBase: paths.BUILD_DIR,
- publicPath: '',
- historyApiFallback: true,
- compress: true,
- port: 4042,
- noInfo: true,
- quiet: true,
- clientLogLevel: 'warning',
- stats: 'errors-only',
- open: true,
- },
- });
|