123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- const webpack = require('webpack');
- const path = require('path');
- const DashboardPlugin = require('webpack-dashboard/plugin');
-
- const baseConfig = require('./webpack.config.base');
-
- const config = {
- ...baseConfig,
- mode: 'development',
- devtool: 'source-map',
- plugins: [
- ...baseConfig.plugins,
-
-
- new webpack.NamedModulesPlugin(),
-
-
- new webpack.NoEmitOnErrorsPlugin(),
-
-
- new webpack.DefinePlugin({
- isProd: JSON.stringify(false)
- }),
- new DashboardPlugin()
- ],
- devServer: {
- allowedHosts: ['0.0.0.0:8081'],
-
- publicPath: '/',
-
- contentBase: path.resolve(__dirname, '../../public'),
- compress: true,
- headers: {
- 'Access-Control-Allow-Origin': '*',
- 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
- 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
- 'X-Content-Type-Options': 'nosniff',
- 'X-Frame-Options': 'DENY'
- },
- open: true,
- overlay: {
- warnings: true,
- errors: true
- },
- host: '0.0.0.0',
- port: 8080,
- hot: false,
- https: false,
- disableHostCheck: true,
- quiet: false
- },
- stats: {
- children: false
- }
- };
-
- delete config.extra;
-
- module.exports = config;
|