1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- 'use strict'
- const webpack = require('webpack')
- const { merge } = require('webpack-merge')
- const baseConfig = require('./webpack.config.base')
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
- const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
- module.exports = merge(baseConfig, {
- mode: 'development',
- module: {
- rules: [
- {
- test: /\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- options: {
- publicPath: '',
- },
- },
- 'css-loader'
- ]
- }, {
- test: /\.scss$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- options: {
- publicPath: '',
- },
- },
- 'css-loader',
- 'sass-loader'
- ]
- }, {
- test: /\.(png|jpg|gif|svg)$/,
- use: [
- {
- loader: 'url-loader',
- options: {
- limit: 5000
- }
- }
- ]
- }
- ]
- },
- plugins: [
- // new webpack.HotModuleReplacementPlugin()
- new BundleAnalyzerPlugin({
- 'analyzerMode': 'static'
- })
- ]
- })
|