Commit d3e7541e authored by guang.wu's avatar guang.wu

feat: 添加webpack 去掉 happyPack

parent 5ea1442e
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
/* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable import/no-extraneous-dependencies */
import ThemeColorReplacer from 'webpack-theme-color-replacer'; import ThemeColorReplacer from 'webpack-theme-color-replacer';
import generate from '@ant-design/colors/lib/generate'; import generate from '@ant-design/colors/lib/generate';
const HappyPack = require('happypack'); import webpack from 'webpack';
const happyThreadPool = HappyPack.ThreadPool({ size: require('os').cpus().length });
const SentryPlugin = require('@qg/sentry-webpack-plugin'); const SentryPlugin = require('@qg/sentry-webpack-plugin');
const SentryConfig = require('../.sentryclirc'); const SentryConfig = require('../.sentryclirc');
...@@ -13,13 +12,6 @@ export default config => { ...@@ -13,13 +12,6 @@ export default config => {
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
config.plugin('sentry-webpack-plugin').use(SentryPlugin, [SentryConfig]); config.plugin('sentry-webpack-plugin').use(SentryPlugin, [SentryConfig]);
} }
config.plugin('HappyPack').use(HappyPack, [
{
id: 'js',
loaders: ['babel-loader'],
threadPool: happyThreadPool,
},
]);
// preview.pro.ant.design only do not use in your production; // preview.pro.ant.design only do not use in your production;
if ( if (
process.env.ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' || process.env.ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' ||
......
This diff is collapsed.
...@@ -63,12 +63,10 @@ ...@@ -63,12 +63,10 @@
"antd-virtual-select": "^1.1.2", "antd-virtual-select": "^1.1.2",
"array-move": "^4.0.0", "array-move": "^4.0.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-loader": "^9.1.2",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"date-fns": "^2.16.1", "date-fns": "^2.16.1",
"dva": "^2.4.1", "dva": "^2.4.1",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"happypack": "^5.0.1",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"moment": "^2.24.0", "moment": "^2.24.0",
"omit.js": "^1.0.2", "omit.js": "^1.0.2",
...@@ -130,7 +128,8 @@ ...@@ -130,7 +128,8 @@
"node-fetch": "^2.6.0", "node-fetch": "^2.6.0",
"prettier": "^1.17.1", "prettier": "^1.17.1",
"pro-download": "1.0.1", "pro-download": "1.0.1",
"stylelint": "^10.1.0" "stylelint": "^10.1.0",
"webpack": "^4.46.0"
}, },
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment