|
|
|
@ -11,7 +11,8 @@ const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
|
|
|
|
|
const eslintFormatter = require('react-dev-utils/eslintFormatter');
|
|
|
|
|
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
|
|
|
|
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin');
|
|
|
|
|
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
|
|
|
// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
|
|
|
// const TerserPlugin = require('terser-webpack-plugin');
|
|
|
|
|
|
|
|
|
|
const paths = require('./paths');
|
|
|
|
|
const getClientEnvironment = require('./env');
|
|
|
|
@ -55,6 +56,10 @@ const extractTextPluginOptions = shouldUseRelativeAssetPaths
|
|
|
|
|
// 上线用的
|
|
|
|
|
// console.log('publicPath ', publicPath)
|
|
|
|
|
module.exports = {
|
|
|
|
|
// optimization: {
|
|
|
|
|
// minimize: true,
|
|
|
|
|
// minimizer: [new TerserPlugin()],
|
|
|
|
|
// },
|
|
|
|
|
// externals: {
|
|
|
|
|
// 'react': 'window.React'
|
|
|
|
|
// },
|
|
|
|
@ -372,7 +377,7 @@ module.exports = {
|
|
|
|
|
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
|
|
|
|
// You can remove this if you don't use Moment.js:
|
|
|
|
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
|
|
|
|
new MonacoWebpackPlugin(),
|
|
|
|
|
// new MonacoWebpackPlugin(),
|
|
|
|
|
],
|
|
|
|
|
// Some libraries import Node modules but don't use them in the browser.
|
|
|
|
|
// Tell Webpack to provide empty mocks for them so importing them works.
|
|
|
|
|