UNPKG

@msfw/cli

Version:

Install the package in your project directory with:

43 lines (42 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class WpDevelopment { setup(webpackChain) { const ctx = webpackChain.context; const devServer = { host: '0.0.0.0', allowedHosts: 'all', historyApiFallback: true, // compress: true, static: [ // 输出静态文件 { directory: ctx.appPublic, publicPath: '/', }, ], headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': '*', 'Access-Control-Allow-Headers': '*', }, compress: true, client: { overlay: { errors: true, warnings: true, }, }, }; const config = { mode: 'development', devtool: 'inline-source-map', devServer, optimization: { chunkIds: 'deterministic', }, }; webpackChain.merge(config); } } exports.default = WpDevelopment;