@umijs/bundler-webpack 4.0.0-rc.2 → 4.0.0-rc.22
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 +65 -37
- package/client/constants.js +9 -0
- package/compiled/autoprefixer/browserslist/index.d.ts +2 -0
- package/compiled/autoprefixer/index.js +3 -3
- package/compiled/autoprefixer/postcss/lib/declaration.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/node.d.ts +2 -2
- package/compiled/babel-loader/index.js +2 -2
- package/compiled/copy-webpack-plugin/{576.index.js → 939.index.js} +11 -11
- package/compiled/copy-webpack-plugin/index.js +12 -12
- package/compiled/css-minimizer-webpack-plugin/index.js +7 -7
- package/compiled/cssnano/index.js +6 -6
- package/compiled/cssnano/package.json +1 -1
- package/compiled/express.d.ts +2 -0
- package/compiled/fork-ts-checker-webpack-plugin/index.js +7 -13
- package/compiled/http-proxy-middleware/index.js +10 -10
- package/compiled/mini-css-extract-plugin/index.js +440 -401
- package/compiled/mini-css-extract-plugin/loader.js +3 -1
- package/compiled/mini-css-extract-plugin/utils.js +2 -0
- 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/terser/index.js +1 -1
- 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 +5155 -3422
- package/compiled/webpack/types.d.ts +606 -171
- package/compiled/webpack-dev-middleware/index.js +8 -7
- package/compiled/webpack-manifest-plugin/index.js +1 -1
- package/dist/build.d.ts +1 -0
- package/dist/build.js +48 -57
- package/dist/cli.js +6 -15
- package/dist/client/client.js +57 -51
- package/dist/config/_sampleFeature.js +6 -17
- package/dist/config/assetRules.js +44 -55
- package/dist/config/bundleAnalyzerPlugin.js +12 -23
- package/dist/config/compressPlugin.js +89 -64
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +178 -179
- package/dist/config/copyPlugin.js +29 -40
- package/dist/config/cssRules.js +93 -83
- package/dist/config/definePlugin.js +11 -19
- package/dist/config/detectDeadCode.js +1 -1
- package/dist/config/detectDeadCodePlugin.js +21 -22
- package/dist/config/fastRefreshPlugin.js +11 -22
- package/dist/config/forkTSCheckerPlugin.js +11 -22
- package/dist/config/harmonyLinkingErrorPlugin.js +3 -14
- package/dist/config/ignorePlugin.js +10 -21
- package/dist/config/javaScriptRules.d.ts +1 -0
- package/dist/config/javaScriptRules.js +152 -138
- package/dist/config/manifestPlugin.js +10 -18
- package/dist/config/miniCSSExtractPlugin.js +12 -23
- package/dist/config/nodePolyfill.js +14 -20
- package/dist/config/nodePrefixPlugin.d.ts +11 -0
- package/dist/config/nodePrefixPlugin.js +14 -0
- package/dist/config/progressPlugin.js +7 -18
- package/dist/config/purgecssWebpackPlugin.js +15 -26
- package/dist/config/speedMeasureWebpackPlugin.js +12 -23
- package/dist/config/svgRules.js +44 -47
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +7 -1
- package/dist/dev.d.ts +4 -0
- package/dist/dev.js +115 -94
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -1
- package/dist/loader/svgr.js +4 -13
- package/dist/loader/swc.js +9 -14
- package/dist/plugins/ProgressPlugin.js +2 -2
- package/dist/plugins/RuntimePublicPathPlugin.js +4 -1
- package/dist/schema.js +29 -13
- package/dist/server/server.d.ts +3 -1
- package/dist/server/server.js +166 -148
- package/dist/server/ws.d.ts +7 -2
- package/dist/swcPlugins/autoCSSModules.js +3 -1
- package/dist/swcPlugins/changeImportFromString.d.ts +2 -0
- package/dist/swcPlugins/changeImportFromString.js +10 -0
- package/dist/swcPlugins/lockCoreJS.d.ts +1 -1
- package/dist/swcPlugins/lockCoreJS.js +3 -2
- package/dist/types.d.ts +4 -0
- package/dist/types.js +1 -0
- package/dist/utils/getEsBuildTarget.d.ts +5 -0
- package/dist/utils/getEsBuildTarget.js +12 -0
- package/package.json +33 -35
- package/compiled/css-loader/LICENSE +0 -20
- package/compiled/css-loader/api.js +0 -102
- package/compiled/css-loader/getUrl.js +0 -29
- package/compiled/css-loader/index.js +0 -2
- package/compiled/css-loader/noSourceMaps.js +0 -5
- package/compiled/css-loader/package.json +0 -1
- package/compiled/css-loader/sourceMaps.js +0 -22
- package/compiled/express/LICENSE +0 -24
- package/compiled/express/body-parser/index.d.ts +0 -104
- package/compiled/express/connect/index.d.ts +0 -93
- package/compiled/express/express-serve-static-core/index.d.ts +0 -1252
- package/compiled/express/index.d.ts +0 -133
- package/compiled/express/index.js +0 -321
- package/compiled/express/mime/index.d.ts +0 -35
- package/compiled/express/package.json +0 -1
- package/compiled/express/qs/index.d.ts +0 -62
- package/compiled/express/range-parser/index.d.ts +0 -35
- package/compiled/express/serve-static/index.d.ts +0 -108
- package/compiled/less/index.js +0 -31
- package/compiled/less/package.json +0 -1
- package/compiled/tapable/index.js +0 -1
- package/compiled/tapable/package.json +0 -1
- package/compiled/tapable/tapable.d.ts +0 -116
- package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts +0 -11
- package/dist/plugins/ESBuildCSSMinifyPlugin.js +0 -65
|
@@ -7,6 +7,7 @@ const {
|
|
|
7
7
|
evalModuleCode,
|
|
8
8
|
AUTO_PUBLIC_PATH,
|
|
9
9
|
ABSOLUTE_PUBLIC_PATH,
|
|
10
|
+
BASE_URI,
|
|
10
11
|
SINGLE_DOT_PATH_SEGMENT,
|
|
11
12
|
stringifyRequest
|
|
12
13
|
} = require("./utils");
|
|
@@ -261,7 +262,8 @@ function pitch(request) {
|
|
|
261
262
|
layer: options.layer,
|
|
262
263
|
publicPath:
|
|
263
264
|
/** @type {string} */
|
|
264
|
-
publicPathForExtract
|
|
265
|
+
publicPathForExtract,
|
|
266
|
+
baseUri: `${BASE_URI}/`
|
|
265
267
|
},
|
|
266
268
|
/**
|
|
267
269
|
* @param {Error | null | undefined} error
|
|
@@ -97,6 +97,7 @@ function compareModulesByIdentifier(a, b) {
|
|
|
97
97
|
const MODULE_TYPE = "css/mini-extract";
|
|
98
98
|
const AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_auto__";
|
|
99
99
|
const ABSOLUTE_PUBLIC_PATH = "webpack:///mini-css-extract-plugin/";
|
|
100
|
+
const BASE_URI = "webpack://";
|
|
100
101
|
const SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_single_dot_path_segment__";
|
|
101
102
|
/**
|
|
102
103
|
* @param {string} str
|
|
@@ -207,6 +208,7 @@ module.exports = {
|
|
|
207
208
|
MODULE_TYPE,
|
|
208
209
|
AUTO_PUBLIC_PATH,
|
|
209
210
|
ABSOLUTE_PUBLIC_PATH,
|
|
211
|
+
BASE_URI,
|
|
210
212
|
SINGLE_DOT_PATH_SEGMENT,
|
|
211
213
|
stringifyRequest,
|
|
212
214
|
getUndoPath
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright
|
|
3
|
+
Copyright (c) Facebook, Inc. and its affiliates.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
(function(){"use strict";var e={
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
1
|
+
(function(){"use strict";var e={653:function(e,t){
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-refresh-runtime.development.js
|
|
4
5
|
*
|
|
5
6
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
7
|
*
|
|
7
8
|
* This source code is licensed under the MIT license found in the
|
|
8
9
|
* LICENSE file in the root directory of this source tree.
|
|
9
10
|
*/
|
|
10
|
-
if(process.env.NODE_ENV!=="production"){(function(){"use strict";
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
11
|
+
if(process.env.NODE_ENV!=="production"){(function(){"use strict";var e=Symbol.for("react.forward_ref");var r=Symbol.for("react.memo");var n=typeof WeakMap==="function"?WeakMap:Map;var o=new Map;var i=new n;var a=new n;var u=new n;var f=[];var s=new Map;var c=new Map;var l=new Set;var d=new Set;var p=typeof WeakMap==="function"?new WeakMap:null;var y=false;function computeFullKey(e){if(e.fullKey!==null){return e.fullKey}var t=e.ownKey;var r;try{r=e.getCustomHooks()}catch(r){e.forceReset=true;e.fullKey=t;return t}for(var n=0;n<r.length;n++){var o=r[n];if(typeof o!=="function"){e.forceReset=true;e.fullKey=t;return t}var i=a.get(o);if(i===undefined){continue}var u=computeFullKey(i);if(i.forceReset){e.forceReset=true}t+="\n---\n"+u}e.fullKey=t;return t}function haveEqualSignatures(e,t){var r=a.get(e);var n=a.get(t);if(r===undefined&&n===undefined){return true}if(r===undefined||n===undefined){return false}if(computeFullKey(r)!==computeFullKey(n)){return false}if(n.forceReset){return false}return true}function isReactClass(e){return e.prototype&&e.prototype.isReactComponent}function canPreserveStateBetween(e,t){if(isReactClass(e)||isReactClass(t)){return false}if(haveEqualSignatures(e,t)){return true}return false}function resolveFamily(e){return u.get(e)}function cloneMap(e){var t=new Map;e.forEach((function(e,r){t.set(r,e)}));return t}function cloneSet(e){var t=new Set;e.forEach((function(e){t.add(e)}));return t}function getProperty(e,t){try{return e[t]}catch(e){return undefined}}function performReactRefresh(){if(f.length===0){return null}if(y){return null}y=true;try{var e=new Set;var t=new Set;var r=f;f=[];r.forEach((function(r){var n=r[0],o=r[1];var i=n.current;u.set(i,n);u.set(o,n);n.current=o;if(canPreserveStateBetween(i,o)){t.add(n)}else{e.add(n)}}));var n={updatedFamilies:t,staleFamilies:e};s.forEach((function(e){e.setRefreshHandler(resolveFamily)}));var o=false;var i=null;var a=cloneSet(d);var h=cloneSet(l);var v=cloneMap(c);a.forEach((function(e){var t=v.get(e);if(t===undefined){throw new Error("Could not find helpers for a root. This is a bug in React Refresh.")}if(!d.has(e)){}if(p===null){return}if(!p.has(e)){return}var r=p.get(e);try{t.scheduleRoot(e,r)}catch(e){if(!o){o=true;i=e}}}));h.forEach((function(e){var t=v.get(e);if(t===undefined){throw new Error("Could not find helpers for a root. This is a bug in React Refresh.")}if(!l.has(e)){}try{t.scheduleRefresh(e,n)}catch(e){if(!o){o=true;i=e}}}));if(o){throw i}return n}finally{y=false}}function register(t,n){{if(t===null){return}if(typeof t!=="function"&&typeof t!=="object"){return}if(i.has(t)){return}var a=o.get(n);if(a===undefined){a={current:t};o.set(n,a)}else{f.push([a,t])}i.set(t,a);if(typeof t==="object"&&t!==null){switch(getProperty(t,"$$typeof")){case e:register(t.render,n+"$render");break;case r:register(t.type,n+"$type");break}}}}function setSignature(t,n){var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var i=arguments.length>3?arguments[3]:undefined;{if(!a.has(t)){a.set(t,{forceReset:o,ownKey:n,fullKey:null,getCustomHooks:i||function(){return[]}})}if(typeof t==="object"&&t!==null){switch(getProperty(t,"$$typeof")){case e:setSignature(t.render,n,o,i);break;case r:setSignature(t.type,n,o,i);break}}}}function collectCustomHooksForSignature(e){{var t=a.get(e);if(t!==undefined){computeFullKey(t)}}}function getFamilyByID(e){{return o.get(e)}}function getFamilyByType(e){{return i.get(e)}}function findAffectedHostInstances(e){{var t=new Set;l.forEach((function(r){var n=c.get(r);if(n===undefined){throw new Error("Could not find helpers for a root. This is a bug in React Refresh.")}var o=n.findHostInstancesForRefresh(r,e);o.forEach((function(e){t.add(e)}))}));return t}}function injectIntoGlobalHook(e){{var t=e.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t===undefined){var r=0;e.__REACT_DEVTOOLS_GLOBAL_HOOK__=t={renderers:new Map,supportsFiber:true,inject:function(e){return r++},onScheduleFiberRoot:function(e,t,r){},onCommitFiberRoot:function(e,t,r,n){},onCommitFiberUnmount:function(){}}}if(t.isDisabled){console["warn"]("Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). "+"Fast Refresh is not compatible with this shim and will be disabled.");return}var n=t.inject;t.inject=function(e){var t=n.apply(this,arguments);if(typeof e.scheduleRefresh==="function"&&typeof e.setRefreshHandler==="function"){s.set(t,e)}return t};t.renderers.forEach((function(e,t){if(typeof e.scheduleRefresh==="function"&&typeof e.setRefreshHandler==="function"){s.set(t,e)}}));var o=t.onCommitFiberRoot;var i=t.onScheduleFiberRoot||function(){};t.onScheduleFiberRoot=function(e,t,r){if(!y){d.delete(t);if(p!==null){p.set(t,r)}}return i.apply(this,arguments)};t.onCommitFiberRoot=function(e,t,r,n){var i=s.get(e);if(i!==undefined){c.set(t,i);var a=t.current;var u=a.alternate;if(u!==null){var f=u.memoizedState!=null&&u.memoizedState.element!=null&&l.has(t);var p=a.memoizedState!=null&&a.memoizedState.element!=null;if(!f&&p){l.add(t);d.delete(t)}else if(f&&p);else if(f&&!p){l.delete(t);if(n){d.add(t)}else{c.delete(t)}}else if(!f&&!p){if(n){d.add(t)}}}else{l.add(t)}}return o.apply(this,arguments)}}}function hasUnrecoverableErrors(){return false}function _getMountedRootCount(){{return l.size}}function createSignatureFunctionForTransform(){{var e;var t;var r=false;return function(n,o,i,a){if(typeof o==="string"){if(!e){e=n;t=typeof a==="function"}if(n!=null&&(typeof n==="function"||typeof n==="object")){setSignature(n,o,i,a)}return n}else{if(!r&&t){r=true;collectCustomHooksForSignature(e)}}}}}function isLikelyComponentType(t){{switch(typeof t){case"function":{if(t.prototype!=null){if(t.prototype.isReactComponent){return true}var n=Object.getOwnPropertyNames(t.prototype);if(n.length>1||n[0]!=="constructor"){return false}if(t.prototype.__proto__!==Object.prototype){return false}}var o=t.name||t.displayName;return typeof o==="string"&&/^[A-Z]/.test(o)}case"object":{if(t!=null){switch(getProperty(t,"$$typeof")){case e:case r:return true;default:return false}}return false}default:{return false}}}}t._getMountedRootCount=_getMountedRootCount;t.collectCustomHooksForSignature=collectCustomHooksForSignature;t.createSignatureFunctionForTransform=createSignatureFunctionForTransform;t.findAffectedHostInstances=findAffectedHostInstances;t.getFamilyByID=getFamilyByID;t.getFamilyByType=getFamilyByType;t.hasUnrecoverableErrors=hasUnrecoverableErrors;t.injectIntoGlobalHook=injectIntoGlobalHook;t.isLikelyComponentType=isLikelyComponentType;t.performReactRefresh=performReactRefresh;t.register=register;t.setSignature=setSignature})()}},665:function(){
|
|
12
|
+
/**
|
|
13
|
+
* @license React
|
|
14
|
+
* react-refresh-runtime.production.min.js
|
|
13
15
|
*
|
|
14
16
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
17
|
*
|
|
16
18
|
* This source code is licensed under the MIT license found in the
|
|
17
19
|
* LICENSE file in the root directory of this source tree.
|
|
18
20
|
*/
|
|
19
|
-
|
|
21
|
+
throw Error("React Refresh runtime should not be included in the production bundle.")},999:function(e,t,r){if(process.env.NODE_ENV==="production"){e.exports=r(665)}else{e.exports=r(653)}}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var o=t[r]={exports:{}};var i=true;try{e[r](o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(999);module.exports=r})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"react-refresh","license":"MIT"}
|