@umijs/bundler-webpack 4.0.0-rc.10 → 4.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/client/client.js +10 -4
- package/client/constants.js +6 -0
- package/compiled/cssnano/index.js +6 -6
- package/compiled/fork-ts-checker-webpack-plugin/index.js +7 -13
- package/compiled/{tapable → react-refresh}/LICENSE +6 -6
- package/compiled/react-refresh/index.js +9 -7
- package/compiled/react-refresh/package.json +1 -0
- package/compiled/webpack/BasicEffectRulePlugin.js +1 -0
- package/compiled/webpack/BasicMatcherRulePlugin.js +1 -0
- package/compiled/webpack/HotModuleReplacement.runtime.js +29 -14
- package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +4 -3
- package/compiled/webpack/ObjectMatcherRulePlugin.js +1 -0
- package/compiled/webpack/RuleSetCompiler.js +1 -0
- package/compiled/webpack/UseEffectRulePlugin.js +1 -0
- package/compiled/webpack/deepImports.json +6 -1
- package/compiled/webpack/index.js +4473 -2910
- package/compiled/webpack/types.d.ts +606 -171
- package/compiled/webpack-manifest-plugin/index.js +1 -1
- package/dist/build.d.ts +1 -0
- package/dist/build.js +1 -0
- package/dist/client/client.js +10 -4
- package/dist/config/compressPlugin.js +9 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/config.js +7 -2
- package/dist/config/nodePolyfill.js +1 -1
- package/dist/config/nodePrefixPlugin.d.ts +11 -0
- package/dist/config/nodePrefixPlugin.js +25 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +7 -1
- package/dist/dev.d.ts +4 -0
- package/dist/dev.js +19 -7
- package/dist/schema.js +1 -0
- package/dist/server/https.d.ts +5 -0
- package/dist/server/https.js +73 -0
- package/dist/server/server.d.ts +3 -1
- package/dist/server/server.js +24 -3
- package/dist/utils/getEsBuildTarget.d.ts +5 -0
- package/dist/utils/getEsBuildTarget.js +12 -0
- package/package.json +14 -15
- package/compiled/tapable/index.js +0 -1
- package/compiled/tapable/package.json +0 -1
- package/compiled/tapable/tapable.d.ts +0 -116
- package/dist/utils/server.d.ts +0 -5
- package/dist/utils/server.js +0 -93
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";var e={156:function(e,t,s){Object.defineProperty(t,"__esModule",{value:true});t.transformFiles=t.reduceChunk=t.reduceAssets=t.generateManifest=void 0;const n=s(17);const generateManifest=(e,t,{generate:s,seed:n={}})=>{let o;if(s){const i=Array.from(e.entrypoints.entries());const a=i.reduce(((e,[t,s])=>Object.assign(e,{[t]:s.getFiles()})),{});o=s(n,t,a)}else{o=t.reduce(((e,t)=>Object.assign(e,{[t.name]:t.path})),n)}return o};t.generateManifest=generateManifest;const getFileType=(e,{transformExtensions:t})=>{const s=e.replace(/\?.*/,"");const n=s.split(".");const o=n.pop();return t.test(o)?`${n.pop()}.${o}`:o};const reduceAssets=(e,t,s)=>{let o;if(s[t.name]){o=s[t.name]}else if(t.info.sourceFilename){o=n.join(n.dirname(t.name),n.basename(t.info.sourceFilename))}if(o){return e.concat({isAsset:true,isChunk:false,isInitial:false,isModuleAsset:true,name:o,path:t.name})}const i=t.chunks&&t.chunks.length>0;if(i){return e}return e.concat({isAsset:true,isChunk:false,isInitial:false,isModuleAsset:false,name:t.name,path:t.name})};t.reduceAssets=reduceAssets;const reduceChunk=(e,t,s,o)=>{Array.from(t.auxiliaryFiles||[]).forEach((e=>{o[e]={isAsset:true,isChunk:false,isInitial:false,isModuleAsset:true,name:n.basename(e),path:e}}));return Array.from(t.files).reduce(((e,n)=>{let o=t.name?t.name:null;o=o?s.useEntryKeys&&!n.endsWith(".map")?o:`${o}.${getFileType(n,s)}`:n;return e.concat({chunk:t,isAsset:false,isChunk:true,isInitial:t.isOnlyInitial(),isModuleAsset:false,name:o,path:n})}),e)};t.reduceChunk=reduceChunk;const standardizeFilePaths=e=>{const t=Object.assign({},e);t.name=e.name.replace(/\\/g,"/");t.path=e.path.replace(/\\/g,"/");return t};const transformFiles=(e,t)=>["filter","map","sort"].filter((e=>!!t[e])).reduce(((e,s)=>e[s](t[s])),e).map(standardizeFilePaths);t.transformFiles=transformFiles},874:function(e,t,s){Object.defineProperty(t,"__esModule",{value:true});t.normalModuleLoaderHook=t.getCompilerHooks=t.emitHook=t.beforeRunHook=void 0;const n=s(147);const o=s(17);const i=s(535);const a=s(728);const r=s(156);const u=new WeakMap;const getCompilerHooks=e=>{let t=u.get(e);if(typeof t==="undefined"){t={afterEmit:new i.SyncWaterfallHook(["manifest"]),beforeEmit:new i.SyncWaterfallHook(["manifest"])};u.set(e,t)}return t};t.getCompilerHooks=getCompilerHooks;const beforeRunHook=({emitCountMap:e,manifestFileName:t},s,n)=>{const o=e.get(t)||0;e.set(t,o+1);if(n){n()}};t.beforeRunHook=beforeRunHook;const l=function emit({compiler:e,emitCountMap:t,manifestAssetId:s,manifestFileName:i,moduleAssets:u,options:l},c){const p=t.get(i)-1;const m=c.getStats().toJson({all:false,assets:true,cachedAssets:true,ids:true,publicPath:true});const f=l.publicPath!==null?l.publicPath:m.publicPath;const{basePath:d,removeKeyHash:h}=l;t.set(i,p);const k={};let b=Array.from(c.chunks).reduce(((e,t)=>r.reduceChunk(e,t,l,k)),[]);b=m.assets.reduce(((e,t)=>r.reduceAssets(e,t,u)),b);b=b.filter((({name:s,path:n})=>{var i;return!n.includes("hot-update")&&typeof t.get(o.join(((i=e.options.output)===null||i===void 0?void 0:i.path)||"<unknown>",s))==="undefined"}));b.forEach((e=>{delete k[e.path]}));Object.keys(k).forEach((e=>{b=b.concat(k[e])}));b=b.map((e=>{const normalizePath=e=>{if(!e.endsWith("/")){return`${e}/`}return e};const t={name:d?normalizePath(d)+e.name:e.name,path:f?normalizePath(f)+e.path:e.path};t.name=h?t.name.replace(h,""):t.name;return Object.assign(e,t)}));b=r.transformFiles(b,l);let g=r.generateManifest(c,b,l);const _=p===0;g=getCompilerHooks(e).beforeEmit.call(g);if(_){const e=l.serialize(g);c.emitAsset(s,new a.RawSource(e));if(l.writeToFileEmit){n.mkdirSync(o.dirname(i),{recursive:true});n.writeFileSync(i,e)}}getCompilerHooks(e).afterEmit.call(g)};t.emitHook=l;const normalModuleLoaderHook=({moduleAssets:e},t,s)=>{const{emitFile:n}=t;t.emitFile=(t,i,a)=>{if(s.userRequest&&!e[t]){Object.assign(e,{[t]:o.join(o.dirname(t),o.basename(s.userRequest))})}return n.call(s,t,i,a)}};t.normalModuleLoaderHook=normalModuleLoaderHook},131:function(e,t,s){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.WebpackManifestPlugin=t.getCompilerHooks=void 0;const o=s(17);const i=n(s(205));const a=s(874);Object.defineProperty(t,"getCompilerHooks",{enumerable:true,get:function(){return a.getCompilerHooks}});const r=new Map;const u={assetHookStage:Infinity,basePath:"",fileName:"manifest.json",filter:null,generate:void 0,map:null,publicPath:null,removeKeyHash:/([a-f0-9]{16,32}\.?)/gi,seed:void 0,serialize(e){return JSON.stringify(e,null,2)},sort:null,transformExtensions:/^(gz|map)$/i,useEntryKeys:false,useLegacyEmit:false,writeToFileEmit:false};class WebpackManifestPlugin{constructor(e){this.options=Object.assign({},u,e)}apply(e){var t,s;const n={};const u=o.resolve(((t=e.options.output)===null||t===void 0?void 0:t.path)||"./",this.options.fileName);const l=o.relative(((s=e.options.output)===null||s===void 0?void 0:s.path)||"./",u);const c=a.beforeRunHook.bind(this,{emitCountMap:r,manifestFileName:u});const p=a.emitHook.bind(this,{compiler:e,emitCountMap:r,manifestAssetId:l,manifestFileName:u,moduleAssets:n,options:this.options});const m=a.normalModuleLoaderHook.bind(this,{moduleAssets:n});const f={name:"WebpackManifestPlugin",stage:this.options.assetHookStage};e.hooks.compilation.tap(f,(e=>{const t=!i.default.getCompilationHooks?e.hooks.normalModuleLoader:i.default.getCompilationHooks(e).loader;t.tap(f,m)}));if(this.options.useLegacyEmit===true){e.hooks.emit.tap(f,p)}else{e.hooks.thisCompilation.tap(f,(e=>{e.hooks.processAssets.tap(f,(()=>p(e)))}))}e.hooks.run.tapAsync(f,c);e.hooks.watchRun.tapAsync(f,c)}}t.WebpackManifestPlugin=WebpackManifestPlugin},205:function(e){e.exports=require("../webpack/NormalModule")},535:function(e){e.exports=require("@umijs/bundler-
|
|
1
|
+
(function(){"use strict";var e={156:function(e,t,s){Object.defineProperty(t,"__esModule",{value:true});t.transformFiles=t.reduceChunk=t.reduceAssets=t.generateManifest=void 0;const n=s(17);const generateManifest=(e,t,{generate:s,seed:n={}})=>{let o;if(s){const i=Array.from(e.entrypoints.entries());const a=i.reduce(((e,[t,s])=>Object.assign(e,{[t]:s.getFiles()})),{});o=s(n,t,a)}else{o=t.reduce(((e,t)=>Object.assign(e,{[t.name]:t.path})),n)}return o};t.generateManifest=generateManifest;const getFileType=(e,{transformExtensions:t})=>{const s=e.replace(/\?.*/,"");const n=s.split(".");const o=n.pop();return t.test(o)?`${n.pop()}.${o}`:o};const reduceAssets=(e,t,s)=>{let o;if(s[t.name]){o=s[t.name]}else if(t.info.sourceFilename){o=n.join(n.dirname(t.name),n.basename(t.info.sourceFilename))}if(o){return e.concat({isAsset:true,isChunk:false,isInitial:false,isModuleAsset:true,name:o,path:t.name})}const i=t.chunks&&t.chunks.length>0;if(i){return e}return e.concat({isAsset:true,isChunk:false,isInitial:false,isModuleAsset:false,name:t.name,path:t.name})};t.reduceAssets=reduceAssets;const reduceChunk=(e,t,s,o)=>{Array.from(t.auxiliaryFiles||[]).forEach((e=>{o[e]={isAsset:true,isChunk:false,isInitial:false,isModuleAsset:true,name:n.basename(e),path:e}}));return Array.from(t.files).reduce(((e,n)=>{let o=t.name?t.name:null;o=o?s.useEntryKeys&&!n.endsWith(".map")?o:`${o}.${getFileType(n,s)}`:n;return e.concat({chunk:t,isAsset:false,isChunk:true,isInitial:t.isOnlyInitial(),isModuleAsset:false,name:o,path:n})}),e)};t.reduceChunk=reduceChunk;const standardizeFilePaths=e=>{const t=Object.assign({},e);t.name=e.name.replace(/\\/g,"/");t.path=e.path.replace(/\\/g,"/");return t};const transformFiles=(e,t)=>["filter","map","sort"].filter((e=>!!t[e])).reduce(((e,s)=>e[s](t[s])),e).map(standardizeFilePaths);t.transformFiles=transformFiles},874:function(e,t,s){Object.defineProperty(t,"__esModule",{value:true});t.normalModuleLoaderHook=t.getCompilerHooks=t.emitHook=t.beforeRunHook=void 0;const n=s(147);const o=s(17);const i=s(535);const a=s(728);const r=s(156);const u=new WeakMap;const getCompilerHooks=e=>{let t=u.get(e);if(typeof t==="undefined"){t={afterEmit:new i.SyncWaterfallHook(["manifest"]),beforeEmit:new i.SyncWaterfallHook(["manifest"])};u.set(e,t)}return t};t.getCompilerHooks=getCompilerHooks;const beforeRunHook=({emitCountMap:e,manifestFileName:t},s,n)=>{const o=e.get(t)||0;e.set(t,o+1);if(n){n()}};t.beforeRunHook=beforeRunHook;const l=function emit({compiler:e,emitCountMap:t,manifestAssetId:s,manifestFileName:i,moduleAssets:u,options:l},c){const p=t.get(i)-1;const m=c.getStats().toJson({all:false,assets:true,cachedAssets:true,ids:true,publicPath:true});const f=l.publicPath!==null?l.publicPath:m.publicPath;const{basePath:d,removeKeyHash:h}=l;t.set(i,p);const k={};let b=Array.from(c.chunks).reduce(((e,t)=>r.reduceChunk(e,t,l,k)),[]);b=m.assets.reduce(((e,t)=>r.reduceAssets(e,t,u)),b);b=b.filter((({name:s,path:n})=>{var i;return!n.includes("hot-update")&&typeof t.get(o.join(((i=e.options.output)===null||i===void 0?void 0:i.path)||"<unknown>",s))==="undefined"}));b.forEach((e=>{delete k[e.path]}));Object.keys(k).forEach((e=>{b=b.concat(k[e])}));b=b.map((e=>{const normalizePath=e=>{if(!e.endsWith("/")){return`${e}/`}return e};const t={name:d?normalizePath(d)+e.name:e.name,path:f?normalizePath(f)+e.path:e.path};t.name=h?t.name.replace(h,""):t.name;return Object.assign(e,t)}));b=r.transformFiles(b,l);let g=r.generateManifest(c,b,l);const _=p===0;g=getCompilerHooks(e).beforeEmit.call(g);if(_){const e=l.serialize(g);c.emitAsset(s,new a.RawSource(e));if(l.writeToFileEmit){n.mkdirSync(o.dirname(i),{recursive:true});n.writeFileSync(i,e)}}getCompilerHooks(e).afterEmit.call(g)};t.emitHook=l;const normalModuleLoaderHook=({moduleAssets:e},t,s)=>{const{emitFile:n}=t;t.emitFile=(t,i,a)=>{if(s.userRequest&&!e[t]){Object.assign(e,{[t]:o.join(o.dirname(t),o.basename(s.userRequest))})}return n.call(s,t,i,a)}};t.normalModuleLoaderHook=normalModuleLoaderHook},131:function(e,t,s){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.WebpackManifestPlugin=t.getCompilerHooks=void 0;const o=s(17);const i=n(s(205));const a=s(874);Object.defineProperty(t,"getCompilerHooks",{enumerable:true,get:function(){return a.getCompilerHooks}});const r=new Map;const u={assetHookStage:Infinity,basePath:"",fileName:"manifest.json",filter:null,generate:void 0,map:null,publicPath:null,removeKeyHash:/([a-f0-9]{16,32}\.?)/gi,seed:void 0,serialize(e){return JSON.stringify(e,null,2)},sort:null,transformExtensions:/^(gz|map)$/i,useEntryKeys:false,useLegacyEmit:false,writeToFileEmit:false};class WebpackManifestPlugin{constructor(e){this.options=Object.assign({},u,e)}apply(e){var t,s;const n={};const u=o.resolve(((t=e.options.output)===null||t===void 0?void 0:t.path)||"./",this.options.fileName);const l=o.relative(((s=e.options.output)===null||s===void 0?void 0:s.path)||"./",u);const c=a.beforeRunHook.bind(this,{emitCountMap:r,manifestFileName:u});const p=a.emitHook.bind(this,{compiler:e,emitCountMap:r,manifestAssetId:l,manifestFileName:u,moduleAssets:n,options:this.options});const m=a.normalModuleLoaderHook.bind(this,{moduleAssets:n});const f={name:"WebpackManifestPlugin",stage:this.options.assetHookStage};e.hooks.compilation.tap(f,(e=>{const t=!i.default.getCompilationHooks?e.hooks.normalModuleLoader:i.default.getCompilationHooks(e).loader;t.tap(f,m)}));if(this.options.useLegacyEmit===true){e.hooks.emit.tap(f,p)}else{e.hooks.thisCompilation.tap(f,(e=>{e.hooks.processAssets.tap(f,(()=>p(e)))}))}e.hooks.run.tapAsync(f,c);e.hooks.watchRun.tapAsync(f,c)}}t.WebpackManifestPlugin=WebpackManifestPlugin},205:function(e){e.exports=require("../webpack/NormalModule")},535:function(e){e.exports=require("@umijs/bundler-utils/compiled/tapable")},728:function(e){e.exports=require("@umijs/bundler-webpack/compiled/webpack-sources")},147:function(e){e.exports=require("fs")},17:function(e){e.exports=require("path")}};var t={};function __nccwpck_require__(s){var n=t[s];if(n!==undefined){return n.exports}var o=t[s]={exports:{}};var i=true;try{e[s].call(o.exports,o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete t[s]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s=__nccwpck_require__(131);module.exports=s})();
|
package/dist/build.d.ts
CHANGED
package/dist/build.js
CHANGED
|
@@ -21,6 +21,7 @@ function build(opts) {
|
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const webpackConfig = yield (0, config_1.getConfig)({
|
|
23
23
|
cwd: opts.cwd,
|
|
24
|
+
rootDir: opts.rootDir,
|
|
24
25
|
env: types_1.Env.production,
|
|
25
26
|
entry: opts.entry,
|
|
26
27
|
userConfig: opts.config,
|
package/dist/client/client.js
CHANGED
|
@@ -41,15 +41,21 @@ const ErrorOverlay = __importStar(require("react-error-overlay"));
|
|
|
41
41
|
const constants_1 = require("../constants");
|
|
42
42
|
const formatWebpackMessages_1 = require("../utils/formatWebpackMessages");
|
|
43
43
|
console.log('[webpack] connecting...');
|
|
44
|
+
function getSocketHost() {
|
|
45
|
+
let l = location;
|
|
46
|
+
if (process.env.SOCKET_SERVER) {
|
|
47
|
+
l = new URL(process.env.SOCKET_SERVER);
|
|
48
|
+
}
|
|
49
|
+
const host = l.host;
|
|
50
|
+
const isHttps = l.protocol === 'https:';
|
|
51
|
+
return `${isHttps ? 'wss' : 'ws'}://${host}`;
|
|
52
|
+
}
|
|
44
53
|
let pingTimer = null;
|
|
45
|
-
const host = location.host;
|
|
46
|
-
const isHttps = location.protocol === 'https:';
|
|
47
|
-
const wsUrl = `${isHttps ? 'wss' : 'ws'}://${host}`;
|
|
48
54
|
let isFirstCompilation = true;
|
|
49
55
|
let mostRecentCompilationHash = null;
|
|
50
56
|
let hasCompileErrors = false;
|
|
51
57
|
let hadRuntimeError = false;
|
|
52
|
-
const socket = new WebSocket(
|
|
58
|
+
const socket = new WebSocket(getSocketHost(), 'webpack-hmr');
|
|
53
59
|
socket.addEventListener('message', ({ data }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
60
|
data = JSON.parse(data);
|
|
55
61
|
if (data.type === 'connected') {
|
|
@@ -19,6 +19,7 @@ const terser_webpack_plugin_1 = __importDefault(require("../../compiled/terser-w
|
|
|
19
19
|
const ESBuildCSSMinifyPlugin_1 = __importDefault(require("../plugins/ESBuildCSSMinifyPlugin"));
|
|
20
20
|
const ParcelCSSMinifyPlugin_1 = require("../plugins/ParcelCSSMinifyPlugin");
|
|
21
21
|
const types_1 = require("../types");
|
|
22
|
+
const getEsBuildTarget_1 = require("../utils/getEsBuildTarget");
|
|
22
23
|
function addCompressPlugin(opts) {
|
|
23
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
25
|
const { config, userConfig, env } = opts;
|
|
@@ -32,8 +33,14 @@ function addCompressPlugin(opts) {
|
|
|
32
33
|
}
|
|
33
34
|
config.optimization.minimize(true);
|
|
34
35
|
let minify;
|
|
36
|
+
let terserOptions;
|
|
35
37
|
if (jsMinifier === types_1.JSMinifier.esbuild) {
|
|
36
38
|
minify = terser_webpack_plugin_1.default.esbuildMinify;
|
|
39
|
+
terserOptions = {
|
|
40
|
+
target: (0, getEsBuildTarget_1.getEsBuildTarget)({
|
|
41
|
+
targets: userConfig.targets || {},
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
37
44
|
}
|
|
38
45
|
else if (jsMinifier === types_1.JSMinifier.terser) {
|
|
39
46
|
minify = terser_webpack_plugin_1.default.terserMinify;
|
|
@@ -47,11 +54,12 @@ function addCompressPlugin(opts) {
|
|
|
47
54
|
else if (jsMinifier !== types_1.JSMinifier.none) {
|
|
48
55
|
throw new Error(`Unsupported jsMinifier ${userConfig.jsMinifier}.`);
|
|
49
56
|
}
|
|
57
|
+
terserOptions = Object.assign(Object.assign({}, terserOptions), userConfig.jsMinifierOptions);
|
|
50
58
|
if (jsMinifier !== types_1.JSMinifier.none) {
|
|
51
59
|
config.optimization.minimizer(`js-${jsMinifier}`).use(terser_webpack_plugin_1.default, [
|
|
52
60
|
{
|
|
53
61
|
minify,
|
|
54
|
-
terserOptions
|
|
62
|
+
terserOptions,
|
|
55
63
|
},
|
|
56
64
|
]);
|
|
57
65
|
}
|
package/dist/config/config.d.ts
CHANGED
package/dist/config/config.js
CHANGED
|
@@ -35,6 +35,7 @@ const javaScriptRules_1 = require("./javaScriptRules");
|
|
|
35
35
|
const manifestPlugin_1 = require("./manifestPlugin");
|
|
36
36
|
const miniCSSExtractPlugin_1 = require("./miniCSSExtractPlugin");
|
|
37
37
|
const nodePolyfill_1 = require("./nodePolyfill");
|
|
38
|
+
const nodePrefixPlugin_1 = require("./nodePrefixPlugin");
|
|
38
39
|
const progressPlugin_1 = require("./progressPlugin");
|
|
39
40
|
const speedMeasureWebpackPlugin_1 = require("./speedMeasureWebpackPlugin");
|
|
40
41
|
const svgRules_1 = require("./svgRules");
|
|
@@ -153,6 +154,8 @@ function getConfig(opts) {
|
|
|
153
154
|
// await applyPurgeCSSWebpackPlugin(applyOpts);
|
|
154
155
|
// handle HarmonyLinkingError
|
|
155
156
|
yield (0, harmonyLinkingErrorPlugin_1.addHarmonyLinkingErrorPlugin)(applyOpts);
|
|
157
|
+
// remove node: prefix
|
|
158
|
+
yield (0, nodePrefixPlugin_1.addNodePrefixPlugin)(applyOpts);
|
|
156
159
|
// runtimePublicPath
|
|
157
160
|
if (userConfig.runtimePublicPath) {
|
|
158
161
|
config.plugin('runtimePublicPath').use(RuntimePublicPathPlugin_1.RuntimePublicPathPlugin);
|
|
@@ -166,7 +169,8 @@ function getConfig(opts) {
|
|
|
166
169
|
config: opts.cache.buildDependencies || [],
|
|
167
170
|
},
|
|
168
171
|
cacheDirectory: opts.cache.cacheDirectory ||
|
|
169
|
-
|
|
172
|
+
// 使用 rootDir 是在有 APP_ROOT 时,把 cache 目录放在根目录下
|
|
173
|
+
(0, path_1.join)(opts.rootDir || opts.cwd, 'node_modules', '.cache', 'bundler-webpack'),
|
|
170
174
|
});
|
|
171
175
|
// tnpm 安装依赖的情况 webpack 默认的 managedPaths 不生效
|
|
172
176
|
// 使用 immutablePaths 避免 node_modules 的内容被写入缓存
|
|
@@ -175,7 +179,8 @@ function getConfig(opts) {
|
|
|
175
179
|
if ( /*isTnpm*/require('@umijs/utils/package').__npminstall_done) {
|
|
176
180
|
config.snapshot({
|
|
177
181
|
immutablePaths: [
|
|
178
|
-
opts.cache.absNodeModulesPath ||
|
|
182
|
+
opts.cache.absNodeModulesPath ||
|
|
183
|
+
(0, path_1.join)(opts.rootDir || opts.cwd, 'node_modules'),
|
|
179
184
|
],
|
|
180
185
|
});
|
|
181
186
|
}
|
|
@@ -14,12 +14,12 @@ const webpack_1 = require("@umijs/bundler-webpack/compiled/webpack");
|
|
|
14
14
|
function addNodePolyfill(opts) {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
16
|
const { config } = opts;
|
|
17
|
-
const nodeLibs = require('node-libs-browser');
|
|
18
17
|
config.plugin('node-polyfill-provider').use(webpack_1.ProvidePlugin, [
|
|
19
18
|
{
|
|
20
19
|
Buffer: ['buffer', 'Buffer'],
|
|
21
20
|
},
|
|
22
21
|
]);
|
|
22
|
+
const nodeLibs = require('node-libs-browser');
|
|
23
23
|
config.resolve.fallback.merge(Object.assign(Object.assign({}, Object.keys(nodeLibs).reduce((memo, key) => {
|
|
24
24
|
if (nodeLibs[key]) {
|
|
25
25
|
memo[key] = nodeLibs[key];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Config from '@umijs/bundler-webpack/compiled/webpack-5-chain';
|
|
2
|
+
import { Env, IConfig } from '../types';
|
|
3
|
+
interface IOpts {
|
|
4
|
+
name?: string;
|
|
5
|
+
config: Config;
|
|
6
|
+
userConfig: IConfig;
|
|
7
|
+
cwd: string;
|
|
8
|
+
env: Env;
|
|
9
|
+
}
|
|
10
|
+
export declare function addNodePrefixPlugin(opts: IOpts): Promise<void>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.addNodePrefixPlugin = void 0;
|
|
13
|
+
const webpack_1 = require("@umijs/bundler-webpack/compiled/webpack");
|
|
14
|
+
function addNodePrefixPlugin(opts) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const { config } = opts;
|
|
17
|
+
config.plugin('node-prefix-plugin').use(webpack_1.NormalModuleReplacementPlugin, [
|
|
18
|
+
/^node:/,
|
|
19
|
+
(resource) => {
|
|
20
|
+
resource.request = resource.request.replace(/^node:/, '');
|
|
21
|
+
},
|
|
22
|
+
]);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.addNodePrefixPlugin = addNodePrefixPlugin;
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_BROWSER_TARGETS = exports.MESSAGE_TYPE = exports.MFSU_NAME = exports.DEFAULT_OUTPUT_PATH = exports.DEFAULT_DEVTOOL = void 0;
|
|
3
|
+
exports.DEFAULT_ESBUILD_TARGET_KEYS = exports.DEFAULT_BROWSER_TARGETS = exports.MESSAGE_TYPE = exports.MFSU_NAME = exports.DEFAULT_OUTPUT_PATH = exports.DEFAULT_DEVTOOL = void 0;
|
|
4
4
|
exports.DEFAULT_DEVTOOL = 'cheap-module-source-map';
|
|
5
5
|
exports.DEFAULT_OUTPUT_PATH = 'dist';
|
|
6
6
|
exports.MFSU_NAME = 'MFSU';
|
|
@@ -16,3 +16,9 @@ var MESSAGE_TYPE;
|
|
|
16
16
|
exports.DEFAULT_BROWSER_TARGETS = {
|
|
17
17
|
chrome: 80,
|
|
18
18
|
};
|
|
19
|
+
exports.DEFAULT_ESBUILD_TARGET_KEYS = [
|
|
20
|
+
'chrome',
|
|
21
|
+
'firefox',
|
|
22
|
+
'edge',
|
|
23
|
+
'safari',
|
|
24
|
+
];
|
package/dist/dev.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ declare type IOpts = {
|
|
|
4
4
|
afterMiddlewares?: any[];
|
|
5
5
|
beforeMiddlewares?: any[];
|
|
6
6
|
onDevCompileDone?: Function;
|
|
7
|
+
onProgress?: Function;
|
|
8
|
+
onMFSUProgress?: Function;
|
|
7
9
|
port?: number;
|
|
8
10
|
host?: string;
|
|
9
11
|
babelPreset?: any;
|
|
@@ -14,8 +16,10 @@ declare type IOpts = {
|
|
|
14
16
|
extraBabelPlugins?: any[];
|
|
15
17
|
extraBabelPresets?: any[];
|
|
16
18
|
cwd: string;
|
|
19
|
+
rootDir?: string;
|
|
17
20
|
config: IConfig;
|
|
18
21
|
entry: Record<string, string>;
|
|
19
22
|
} & Pick<IConfigOpts, 'cache'>;
|
|
23
|
+
export declare function stripUndefined(obj: any): any;
|
|
20
24
|
export declare function dev(opts: IOpts): Promise<void>;
|
|
21
25
|
export {};
|
package/dist/dev.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.dev = void 0;
|
|
15
|
+
exports.dev = exports.stripUndefined = void 0;
|
|
16
16
|
const mfsu_1 = require("@umijs/mfsu");
|
|
17
17
|
const utils_1 = require("@umijs/utils");
|
|
18
18
|
const path_1 = require("path");
|
|
@@ -21,6 +21,15 @@ const config_1 = require("./config/config");
|
|
|
21
21
|
const constants_1 = require("./constants");
|
|
22
22
|
const server_1 = require("./server/server");
|
|
23
23
|
const types_1 = require("./types");
|
|
24
|
+
function stripUndefined(obj) {
|
|
25
|
+
Object.keys(obj).forEach((key) => {
|
|
26
|
+
if (obj[key] === undefined) {
|
|
27
|
+
delete obj[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return obj;
|
|
31
|
+
}
|
|
32
|
+
exports.stripUndefined = stripUndefined;
|
|
24
33
|
function dev(opts) {
|
|
25
34
|
var _a, _b, _c, _d, _e, _f;
|
|
26
35
|
var _g;
|
|
@@ -40,23 +49,24 @@ function dev(opts) {
|
|
|
40
49
|
mfName: (_c = opts.config.mfsu) === null || _c === void 0 ? void 0 : _c.mfName,
|
|
41
50
|
runtimePublicPath: opts.config.runtimePublicPath,
|
|
42
51
|
tmpBase: ((_d = opts.config.mfsu) === null || _d === void 0 ? void 0 : _d.cacheDirectory) ||
|
|
43
|
-
(0, path_1.join)(opts.cwd, 'node_modules/.cache/mfsu'),
|
|
52
|
+
(0, path_1.join)(opts.rootDir || opts.cwd, 'node_modules/.cache/mfsu'),
|
|
53
|
+
onMFSUProgress: opts.onMFSUProgress,
|
|
44
54
|
getCacheDependency() {
|
|
45
|
-
|
|
46
|
-
return {
|
|
55
|
+
return stripUndefined({
|
|
47
56
|
version: require('../package.json').version,
|
|
48
|
-
|
|
57
|
+
mfsu: opts.config.mfsu,
|
|
49
58
|
alias: opts.config.alias,
|
|
50
59
|
externals: opts.config.externals,
|
|
51
60
|
theme: opts.config.theme,
|
|
52
61
|
runtimePublicPath: opts.config.runtimePublicPath,
|
|
53
62
|
publicPath: opts.config.publicPath,
|
|
54
|
-
};
|
|
63
|
+
});
|
|
55
64
|
},
|
|
56
65
|
});
|
|
57
66
|
}
|
|
58
67
|
const webpackConfig = yield (0, config_1.getConfig)({
|
|
59
68
|
cwd: opts.cwd,
|
|
69
|
+
rootDir: opts.rootDir,
|
|
60
70
|
env: types_1.Env.development,
|
|
61
71
|
entry: opts.entry,
|
|
62
72
|
userConfig: opts.config,
|
|
@@ -79,6 +89,7 @@ function dev(opts) {
|
|
|
79
89
|
});
|
|
80
90
|
const depConfig = yield (0, config_1.getConfig)({
|
|
81
91
|
cwd: opts.cwd,
|
|
92
|
+
rootDir: opts.rootDir,
|
|
82
93
|
env: types_1.Env.development,
|
|
83
94
|
entry: opts.entry,
|
|
84
95
|
userConfig: opts.config,
|
|
@@ -88,7 +99,7 @@ function dev(opts) {
|
|
|
88
99
|
chainWebpack: (_e = opts.config.mfsu) === null || _e === void 0 ? void 0 : _e.chainWebpack,
|
|
89
100
|
cache: {
|
|
90
101
|
buildDependencies: (_f = opts.cache) === null || _f === void 0 ? void 0 : _f.buildDependencies,
|
|
91
|
-
cacheDirectory: (0, path_1.join)(opts.cwd, 'node_modules', '.cache', 'mfsu-deps'),
|
|
102
|
+
cacheDirectory: (0, path_1.join)(opts.rootDir || opts.cwd, 'node_modules', '.cache', 'mfsu-deps'),
|
|
92
103
|
},
|
|
93
104
|
});
|
|
94
105
|
(_g = webpackConfig.resolve).alias || (_g.alias = {});
|
|
@@ -113,6 +124,7 @@ function dev(opts) {
|
|
|
113
124
|
host: opts.host,
|
|
114
125
|
afterMiddlewares: [...(opts.afterMiddlewares || [])],
|
|
115
126
|
onDevCompileDone: opts.onDevCompileDone,
|
|
127
|
+
onProgress: opts.onProgress,
|
|
116
128
|
});
|
|
117
129
|
});
|
|
118
130
|
}
|
package/dist/schema.js
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.createHttpsServer = void 0;
|
|
16
|
+
const utils_1 = require("@umijs/utils");
|
|
17
|
+
const fs_1 = require("fs");
|
|
18
|
+
const https_1 = __importDefault(require("https"));
|
|
19
|
+
const path_1 = require("path");
|
|
20
|
+
const defaultHttpsHosts = ['localhost', '127.0.0.1'];
|
|
21
|
+
function createHttpsServer(app, httpsConfig) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
utils_1.logger.wait('[HTTPS] Starting service in https mode...');
|
|
24
|
+
// Check if mkcert is installed
|
|
25
|
+
try {
|
|
26
|
+
yield utils_1.execa.execa('mkcert', ['--version']);
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
utils_1.logger.error('[HTTPS] The mkcert has not been installed.');
|
|
30
|
+
utils_1.logger.info('[HTTPS] Please follow the guide to install manually.');
|
|
31
|
+
switch (process.platform) {
|
|
32
|
+
case 'darwin':
|
|
33
|
+
console.log(utils_1.chalk.green('$ brew install mkcert'));
|
|
34
|
+
console.log(utils_1.chalk.gray('# If you use firefox, please install nss.'));
|
|
35
|
+
console.log(utils_1.chalk.green('$ brew install nss'));
|
|
36
|
+
console.log(utils_1.chalk.green('$ mkcert -install'));
|
|
37
|
+
break;
|
|
38
|
+
case 'win32':
|
|
39
|
+
console.log(utils_1.chalk.green('Checkout https://github.com/FiloSottile/mkcert#windows'));
|
|
40
|
+
break;
|
|
41
|
+
case 'linux':
|
|
42
|
+
console.log(utils_1.chalk.green('Checkout https://github.com/FiloSottile/mkcert#linux'));
|
|
43
|
+
break;
|
|
44
|
+
default:
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
throw new Error(`[HTTPS] mkcert not found.`);
|
|
48
|
+
}
|
|
49
|
+
let { key, cert, hosts } = httpsConfig;
|
|
50
|
+
hosts = hosts || defaultHttpsHosts;
|
|
51
|
+
if (!key || !cert) {
|
|
52
|
+
key = (0, path_1.join)(__dirname, 'umi.key.pem');
|
|
53
|
+
cert = (0, path_1.join)(__dirname, 'umi.pem');
|
|
54
|
+
}
|
|
55
|
+
// Generate cert and key files if they are not exist.
|
|
56
|
+
if (!(0, fs_1.existsSync)(key) || !(0, fs_1.existsSync)(cert)) {
|
|
57
|
+
utils_1.logger.wait('[HTTPS] Generating cert and key files...');
|
|
58
|
+
yield utils_1.execa.execa('mkcert', [
|
|
59
|
+
'-cert-file',
|
|
60
|
+
cert,
|
|
61
|
+
'-key-file',
|
|
62
|
+
key,
|
|
63
|
+
...hosts,
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
// Create server
|
|
67
|
+
return https_1.default.createServer({
|
|
68
|
+
key: (0, fs_1.readFileSync)(key, 'utf-8'),
|
|
69
|
+
cert: (0, fs_1.readFileSync)(cert, 'utf-8'),
|
|
70
|
+
}, app);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
exports.createHttpsServer = createHttpsServer;
|
package/dist/server/server.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Configuration } from '@umijs/bundler-webpack/compiled/webpack';
|
|
3
|
+
import http from 'http';
|
|
3
4
|
import { IConfig } from '../types';
|
|
4
5
|
interface IOpts {
|
|
5
6
|
cwd: string;
|
|
@@ -10,6 +11,7 @@ interface IOpts {
|
|
|
10
11
|
beforeMiddlewares?: any[];
|
|
11
12
|
afterMiddlewares?: any[];
|
|
12
13
|
onDevCompileDone?: Function;
|
|
14
|
+
onProgress?: Function;
|
|
13
15
|
}
|
|
14
|
-
export declare function createServer(opts: IOpts): Promise<import("
|
|
16
|
+
export declare function createServer(opts: IOpts): Promise<import("https").Server | http.Server | null>;
|
|
15
17
|
export {};
|
package/dist/server/server.js
CHANGED
|
@@ -18,9 +18,10 @@ const http_proxy_middleware_1 = require("@umijs/bundler-webpack/compiled/http-pr
|
|
|
18
18
|
const webpack_1 = __importDefault(require("@umijs/bundler-webpack/compiled/webpack"));
|
|
19
19
|
const utils_1 = require("@umijs/utils");
|
|
20
20
|
const fs_1 = require("fs");
|
|
21
|
+
const http_1 = __importDefault(require("http"));
|
|
21
22
|
const path_1 = require("path");
|
|
22
23
|
const constants_1 = require("../constants");
|
|
23
|
-
const
|
|
24
|
+
const https_1 = require("./https");
|
|
24
25
|
const ws_1 = require("./ws");
|
|
25
26
|
function createServer(opts) {
|
|
26
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -62,7 +63,25 @@ function createServer(opts) {
|
|
|
62
63
|
}
|
|
63
64
|
});
|
|
64
65
|
// webpack dev middleware
|
|
65
|
-
const
|
|
66
|
+
const configs = Array.isArray(webpackConfig)
|
|
67
|
+
? webpackConfig
|
|
68
|
+
: [webpackConfig];
|
|
69
|
+
const progresses = [];
|
|
70
|
+
if (opts.onProgress) {
|
|
71
|
+
configs.forEach((config) => {
|
|
72
|
+
const progress = {
|
|
73
|
+
percent: 0,
|
|
74
|
+
status: 'waiting',
|
|
75
|
+
};
|
|
76
|
+
progresses.push(progress);
|
|
77
|
+
config.plugins.push(new webpack_1.default.ProgressPlugin((percent, msg) => {
|
|
78
|
+
progress.percent = percent;
|
|
79
|
+
progress.status = msg;
|
|
80
|
+
opts.onProgress({ progresses });
|
|
81
|
+
}));
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const compiler = (0, webpack_1.default)(configs);
|
|
66
85
|
const webpackDevMiddleware = require('@umijs/bundler-webpack/compiled/webpack-dev-middleware');
|
|
67
86
|
const compilerMiddleware = webpackDevMiddleware(compiler, {
|
|
68
87
|
publicPath: userConfig.publicPath || '/',
|
|
@@ -171,7 +190,9 @@ function createServer(opts) {
|
|
|
171
190
|
next();
|
|
172
191
|
}
|
|
173
192
|
});
|
|
174
|
-
const server =
|
|
193
|
+
const server = userConfig.https
|
|
194
|
+
? yield (0, https_1.createHttpsServer)(app, userConfig.https)
|
|
195
|
+
: http_1.default.createServer(app);
|
|
175
196
|
if (!server) {
|
|
176
197
|
return null;
|
|
177
198
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEsBuildTarget = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
function getEsBuildTarget({ targets }) {
|
|
6
|
+
return Object.keys(targets)
|
|
7
|
+
.filter((key) => constants_1.DEFAULT_ESBUILD_TARGET_KEYS.includes(key))
|
|
8
|
+
.map((key) => {
|
|
9
|
+
return `${key}${targets[key] === true ? '0' : targets[key]}`;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.getEsBuildTarget = getEsBuildTarget;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-webpack",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.13",
|
|
4
4
|
"description": "@umijs/bundler-webpack",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-webpack#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"test": "jest -c ../../jest.turbo.config.ts"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@parcel/css": "1.
|
|
33
|
-
"@pmmmwh/react-refresh-webpack-plugin": "0.5.
|
|
32
|
+
"@parcel/css": "1.8.1",
|
|
33
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
|
|
34
34
|
"@svgr/core": "6.2.1",
|
|
35
35
|
"@svgr/plugin-jsx": "^6.2.1",
|
|
36
36
|
"@svgr/plugin-svgo": "^6.2.0",
|
|
37
37
|
"@types/hapi__joi": "17.1.8",
|
|
38
|
-
"@umijs/babel-preset-umi": "4.0.0-rc.
|
|
39
|
-
"@umijs/bundler-utils": "4.0.0-rc.
|
|
40
|
-
"@umijs/mfsu": "4.0.0-rc.
|
|
41
|
-
"@umijs/utils": "4.0.0-rc.
|
|
38
|
+
"@umijs/babel-preset-umi": "4.0.0-rc.13",
|
|
39
|
+
"@umijs/bundler-utils": "4.0.0-rc.13",
|
|
40
|
+
"@umijs/mfsu": "4.0.0-rc.13",
|
|
41
|
+
"@umijs/utils": "4.0.0-rc.13",
|
|
42
42
|
"css-loader": "6.7.1",
|
|
43
43
|
"es5-imcompatible-versions": "^0.1.73",
|
|
44
44
|
"jest-worker": "27.5.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react-error-overlay": "6.0.9"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@swc/core": "1.2.
|
|
51
|
+
"@swc/core": "1.2.165",
|
|
52
52
|
"@types/webpack-sources": "3.2.0",
|
|
53
53
|
"@types/ws": "8.5.3",
|
|
54
54
|
"autoprefixer": "10.4.4",
|
|
@@ -57,25 +57,24 @@
|
|
|
57
57
|
"connect-history-api-fallback": "1.6.0",
|
|
58
58
|
"copy-webpack-plugin": "10.2.4",
|
|
59
59
|
"css-minimizer-webpack-plugin": "3.4.1",
|
|
60
|
-
"cssnano": "5.1.
|
|
61
|
-
"fork-ts-checker-webpack-plugin": "7.2.
|
|
60
|
+
"cssnano": "5.1.7",
|
|
61
|
+
"fork-ts-checker-webpack-plugin": "7.2.4",
|
|
62
62
|
"http-proxy-middleware": "2.0.4",
|
|
63
63
|
"less-loader": "10.2.0",
|
|
64
64
|
"mini-css-extract-plugin": "2.6.0",
|
|
65
65
|
"postcss-flexbugs-fixes": "5.0.2",
|
|
66
66
|
"postcss-loader": "6.2.1",
|
|
67
67
|
"purgecss-webpack-plugin": "4.1.3",
|
|
68
|
-
"react-refresh": "0.
|
|
68
|
+
"react-refresh": "0.12.0",
|
|
69
69
|
"sass-loader": "12.6.0",
|
|
70
70
|
"schema-utils": "4.0.0",
|
|
71
71
|
"speed-measure-webpack-plugin": "1.5.0",
|
|
72
72
|
"style-loader": "3.3.1",
|
|
73
73
|
"svgo-loader": "3.0.0",
|
|
74
|
-
"tapable": "2.2.1",
|
|
75
74
|
"terser": "5.12.1",
|
|
76
75
|
"terser-webpack-plugin": "5.3.1",
|
|
77
76
|
"url-loader": "4.1.1",
|
|
78
|
-
"webpack": "5.
|
|
77
|
+
"webpack": "5.72.0",
|
|
79
78
|
"webpack-5-chain": "8.0.0",
|
|
80
79
|
"webpack-bundle-analyzer": "4.5.0",
|
|
81
80
|
"webpack-dev-middleware": "5.3.1",
|
|
@@ -111,7 +110,6 @@
|
|
|
111
110
|
"style-loader",
|
|
112
111
|
"speed-measure-webpack-plugin",
|
|
113
112
|
"svgo-loader",
|
|
114
|
-
"tapable",
|
|
115
113
|
"terser",
|
|
116
114
|
"terser-webpack-plugin",
|
|
117
115
|
"url-loader",
|
|
@@ -134,7 +132,7 @@
|
|
|
134
132
|
"less": "@umijs/bundler-utils/compiled/less",
|
|
135
133
|
"cssnano": "$$LOCAL",
|
|
136
134
|
"postcss": "postcss",
|
|
137
|
-
"tapable": "
|
|
135
|
+
"tapable": "@umijs/bundler-utils/compiled/tapable",
|
|
138
136
|
"terser": "$$LOCAL",
|
|
139
137
|
"terser-webpack-plugin": "$$LOCAL",
|
|
140
138
|
"typescript": "typescript",
|
|
@@ -175,6 +173,7 @@
|
|
|
175
173
|
"postcss-flexbugs-fixes",
|
|
176
174
|
"postcss-loader",
|
|
177
175
|
"purgecss-webpack-plugin",
|
|
176
|
+
"react-refresh",
|
|
178
177
|
"sass-loader",
|
|
179
178
|
"speed-measure-webpack-plugin",
|
|
180
179
|
"style-loader",
|