@zohodesk/react-cli 1.1.19-exp.2 → 1.1.19-exp.4
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/configs/webpack.prod.config.js +2 -2
- package/lib/loaderUtils/getDevJsLoaders.js +2 -2
- package/lib/loaders/workerLoader.js +24 -39
- package/lib/pluginUtils/configHtmlWebpackPlugins.js +2 -9
- package/lib/pluginUtils/getDevPlugins.js +2 -4
- package/lib/pluginUtils/getProdPlugins.js +1 -3
- package/lib/schemas/index.js +1 -2
- package/npm-shrinkwrap.json +55 -19082
- package/package.json +4 -1
- package/packages/client_build_tool/lib/allCommandsConfigs.js +0 -23
- package/packages/client_build_tool/lib/buildToolLoggers.js +0 -32
- package/packages/client_build_tool/lib/commands/build/commandExecutor.js +0 -21
- package/packages/client_build_tool/lib/commands/build/config.js +0 -12
- package/packages/client_build_tool/lib/commands/build/errorHander.js +0 -10
- package/packages/client_build_tool/lib/commands/build/index.js +0 -35
- package/packages/client_build_tool/lib/commands/build/optionsProcesser.js +0 -40
- package/packages/client_build_tool/lib/commands/buildEs/commandExecutor.js +0 -17
- package/packages/client_build_tool/lib/commands/buildEs/config.js +0 -12
- package/packages/client_build_tool/lib/commands/buildLib/commandExecutor.js +0 -17
- package/packages/client_build_tool/lib/commands/buildLib/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/commandExecutor.js +0 -13
- package/packages/client_build_tool/lib/commands/start/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/deprecationHandler.js +0 -10
- package/packages/client_build_tool/lib/commands/start/errorHander.js +0 -10
- package/packages/client_build_tool/lib/commands/start/optionsProcesser.js +0 -36
- package/packages/client_build_tool/lib/commands/start/postProcesser.js +0 -10
- package/packages/client_build_tool/lib/commands/start/preProcesser.js +0 -10
- package/packages/client_build_tool/lib/commandsRouter.js +0 -71
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/decidePublicPath.js +0 -44
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/libAlias.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/nameTemplates.js +0 -51
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/cssLoaders.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin.js +0 -111
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/EFCPlugin.js +0 -1
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +0 -11
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +0 -136
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +0 -95
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +0 -25
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nDependency.js +0 -99
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +0 -81
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nModule.js +0 -201
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +0 -401
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +0 -67
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +0 -49
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +0 -77
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +0 -63
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +0 -19
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +0 -127
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +0 -1
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +0 -63
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +0 -89
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +0 -15
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +0 -155
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin.js +0 -49
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/ExcludePlugin.js +0 -58
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/RTLSplitPlugin.js +0 -139
- package/packages/client_build_tool/lib/shared/bundler/webpack/devServerConfig.js +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/getCSSLoaders.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/jsLoaders.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -14
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -138
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +0 -83
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaders/workerLoader.js +0 -133
- package/packages/client_build_tool/lib/shared/bundler/webpack/optimizationConfig.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/outputConfig.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCopyThirdpartyFile.js +0 -38
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +0 -35
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +0 -19
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -27
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configUglifyCSSPlugin.js +0 -15
- package/packages/client_build_tool/lib/shared/bundler/webpack/plugins.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/postcssPlugins.js +0 -36
- package/packages/client_build_tool/lib/shared/bundler/webpack/resolvers.js +0 -42
- package/packages/client_build_tool/lib/shared/bundler/webpack/splitChunksConfig.js +0 -12
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpack.dev.config.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackBuild.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackConfig.js +0 -50
- package/packages/client_build_tool/lib/shared/commands-utlis/doBasicRequiermentCheck.js +0 -16
- package/packages/client_build_tool/lib/shared/commands-utlis/getCliPath.js +0 -38
- package/packages/client_build_tool/lib/shared/commands-utlis/index.js +0 -29
- package/packages/client_build_tool/lib/shared/commands-utlis/log.js +0 -13
- package/packages/client_build_tool/lib/shared/commands-utlis/readArgsFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utlis/readOptionFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utlis/spanSync.js +0 -35
- package/packages/client_build_tool/lib/shared/constants.js +0 -33
- package/packages/client_build_tool/lib/shared/schemas/applyValuesToShema.js +0 -37
- package/packages/client_build_tool/lib/shared/schemas/cliArgsToObject.js +0 -37
- package/packages/client_build_tool/lib/shared/schemas/defaultConfigValues.js +0 -119
- package/packages/client_build_tool/lib/shared/schemas/deprecatedOptionsHandler.js +0 -65
- package/packages/client_build_tool/lib/shared/schemas/getCWD.js +0 -23
- package/packages/client_build_tool/lib/shared/schemas/getNpmVersion.js +0 -21
- package/packages/client_build_tool/lib/shared/schemas/npmConfigToObject.js +0 -32
- package/packages/client_build_tool/lib/shared/schemas/oldDefaultConfigValues.js +0 -480
- package/packages/client_build_tool/lib/shared/schemas/readOptions.js +0 -55
- package/packages/client_build_tool/lib/shared/schemas/readOptionsForPackageJson.js +0 -26
- package/packages/client_build_tool/lib/shared/schemas/readOptionsOld.js +0 -152
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.crt +0 -37
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.key +0 -27
- package/packages/client_build_tool/lib/shared/server/configWebpackDevMiddleware.js +0 -40
- package/packages/client_build_tool/lib/shared/server/corsHandleing.js +0 -28
- package/packages/client_build_tool/lib/shared/server/getIp.js +0 -30
- package/packages/client_build_tool/lib/shared/server/getServerURL.js +0 -29
- package/packages/client_build_tool/lib/shared/server/httpsOptions.js +0 -53
- package/packages/client_build_tool/lib/shared/server/initExpressApp.js +0 -19
- package/packages/client_build_tool/lib/shared/server/initialHTMLHandling.js +0 -66
- package/packages/client_build_tool/lib/shared/server/serveContextFiles.js +0 -24
- package/packages/client_build_tool/lib/shared/server/serverBywebpackDevMiddleware.js +0 -40
- package/packages/client_build_tool/lib/shared/server/startHttpServer.js +0 -26
- package/packages/client_build_tool/lib/shared/server/startHttpsServer.js +0 -34
- package/packages/client_build_tool/lib/shared/server/unwanted/addHttp2Server.js +0 -41
- package/packages/client_build_tool/lib/shared/server/unwanted/configWebpackDevMiddleware.js +0 -44
- package/packages/client_build_tool/lib/shared/server/unwanted/devServerUtlis.js +0 -1
- package/packages/client_build_tool/lib/shared/server/unwanted/mockApiSupport.js +0 -19
- package/packages/client_build_tool/lib/shared/server/unwanted/webpackConfig.js +0 -32
- package/packages/client_build_tool/lib/shared/server/unwanted/websocketMockSetup.js +0 -48
- package/packages/client_build_tool/lib/shared/server/urlConcat.js +0 -25
- package/packages/client_build_tool/lib/shared/utils/utils.js +0 -1
- package/packages/client_build_tool/node_modules/history/CHANGES.md +0 -395
- package/packages/client_build_tool/node_modules/history/DOMUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/ExecutionEnvironment.js +0 -3
- package/packages/client_build_tool/node_modules/history/LICENSE +0 -21
- package/packages/client_build_tool/node_modules/history/LocationUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/PathUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/README.md +0 -282
- package/packages/client_build_tool/node_modules/history/cjs/history.js +0 -933
- package/packages/client_build_tool/node_modules/history/cjs/history.min.js +0 -1
- package/packages/client_build_tool/node_modules/history/createBrowserHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createHashHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createMemoryHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createTransitionManager.js +0 -3
- package/packages/client_build_tool/node_modules/history/es/DOMUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/ExecutionEnvironment.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/LocationUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/PathUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createBrowserHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createHashHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createMemoryHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createTransitionManager.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/warnAboutDeprecatedESMImport.js +0 -35
- package/packages/client_build_tool/node_modules/history/esm/history.js +0 -904
- package/packages/client_build_tool/node_modules/history/index.js +0 -7
- package/packages/client_build_tool/node_modules/history/package.json +0 -117
- package/packages/client_build_tool/node_modules/history/umd/history.js +0 -1059
- package/packages/client_build_tool/node_modules/history/umd/history.min.js +0 -1
- package/packages/client_build_tool/node_modules/history/warnAboutDeprecatedCJSRequire.js +0 -35
@@ -132,7 +132,7 @@ module.exports = {
|
|
132
132
|
}], (0, _babelPresetReactOption.default)({
|
133
133
|
disableES5Transpile
|
134
134
|
})],
|
135
|
-
plugins: disableES5Transpile ? [removeAttribute ? require.resolve('../utils/removeAttributes') : false, require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), // require.resolve(
|
135
|
+
plugins: disableES5Transpile ? [removeAttribute ? require.resolve('../utils/removeAttributes') : false, require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('@babel/plugin-proposal-optional-chaining'), require.resolve('babel-plugin-lodash'), // require.resolve(
|
136
136
|
// '@babel/plugin-proposal-object-rest-spread'
|
137
137
|
// ), REMOVING IT, BECAUSE WE ALREADY SUPPORT SPREAD SYNTAX FROM LIBRARIES.
|
138
138
|
shouldRemovePropTypes ? [require.resolve('babel-plugin-transform-react-remove-prop-types'), removePropTypes] : false, devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
@@ -140,7 +140,7 @@ module.exports = {
|
|
140
140
|
}] : null].filter(Boolean) : [removeAttribute ? require.resolve('../utils/removeAttributes') : false, shouldRemovePropTypes ? [require.resolve('babel-plugin-transform-react-remove-prop-types'), removePropTypes] : false, [require.resolve('@babel/plugin-transform-runtime'), {
|
141
141
|
helpers: true,
|
142
142
|
regenerator: false
|
143
|
-
}], require.resolve('@babel/plugin-proposal-object-rest-spread'), require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
143
|
+
}], require.resolve('@babel/plugin-proposal-object-rest-spread'), require.resolve('@babel/plugin-proposal-optional-chaining'), require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
144
144
|
exclude: ['error', 'log']
|
145
145
|
}] : null].filter(Boolean),
|
146
146
|
cacheDirectory: true
|
@@ -46,9 +46,9 @@ let getDevJsLoaders = options => {
|
|
46
46
|
disableES5Transpile
|
47
47
|
})],
|
48
48
|
plugins: disableES5Transpile ? [require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), // require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
49
|
-
devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
49
|
+
require.resolve('@babel/plugin-proposal-object-rest-spread'), require.resolve('@babel/plugin-proposal-optional-chaining'), devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
50
50
|
exclude: ['error', 'log']
|
51
|
-
}] : null].filter(Boolean) : [require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), require.resolve('@babel/plugin-proposal-object-rest-spread'), devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
51
|
+
}] : null].filter(Boolean) : [require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), require.resolve('@babel/plugin-proposal-object-rest-spread'), require.resolve('@babel/plugin-proposal-optional-chaining'), devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
52
52
|
exclude: ['error', 'log']
|
53
53
|
}] : null].filter(Boolean),
|
54
54
|
cacheDirectory: true
|
@@ -19,32 +19,32 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
19
19
|
/* import WebWorkerTemplatePlugin from 'webpack/lib/webworker/WebWorkerTemplatePlugin';
|
20
20
|
import ExternalsPlugin from 'webpack/lib/ExternalsPlugin'; */
|
21
21
|
const schema = {
|
22
|
-
type: 'object',
|
23
|
-
properties: {
|
24
|
-
publicPath: {
|
25
|
-
anyOf: [{
|
26
|
-
type: 'string'
|
22
|
+
'type': 'object',
|
23
|
+
'properties': {
|
24
|
+
'publicPath': {
|
25
|
+
'anyOf': [{
|
26
|
+
'type': 'string'
|
27
27
|
}, {
|
28
|
-
instanceof: 'Function'
|
28
|
+
'instanceof': 'Function'
|
29
29
|
}]
|
30
30
|
},
|
31
|
-
filename: {
|
32
|
-
anyOf: [{
|
33
|
-
type: 'string',
|
34
|
-
minLength: 1
|
31
|
+
'filename': {
|
32
|
+
'anyOf': [{
|
33
|
+
'type': 'string',
|
34
|
+
'minLength': 1
|
35
35
|
}, {
|
36
|
-
instanceof: 'Function'
|
36
|
+
'instanceof': 'Function'
|
37
37
|
}]
|
38
38
|
},
|
39
|
-
chunkFilename: {
|
40
|
-
type: 'string',
|
41
|
-
minLength: 1
|
39
|
+
'chunkFilename': {
|
40
|
+
'type': 'string',
|
41
|
+
'minLength': 1
|
42
42
|
},
|
43
|
-
esModule: {
|
44
|
-
type: 'boolean'
|
43
|
+
'esModule': {
|
44
|
+
'type': 'boolean'
|
45
45
|
}
|
46
46
|
},
|
47
|
-
additionalProperties: false
|
47
|
+
'additionalProperties': false
|
48
48
|
}; // eslint-disable-next-line
|
49
49
|
|
50
50
|
function loader() {}
|
@@ -112,40 +112,25 @@ function pitch(request) {
|
|
112
112
|
}
|
113
113
|
|
114
114
|
function workerCode() {
|
115
|
-
if (this.workerInstance) {
|
116
|
-
return this.workerInstance;
|
117
|
-
}
|
118
|
-
|
119
115
|
let blob;
|
120
116
|
|
121
117
|
try {
|
122
118
|
blob = new Blob([`importScripts('${this.workerUrl}');`], {
|
123
|
-
type: 'application/javascript'
|
119
|
+
'type': 'application/javascript'
|
124
120
|
});
|
125
121
|
} catch (e1) {
|
126
122
|
throw new Error(e1);
|
127
123
|
}
|
128
124
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
return
|
125
|
+
let url = window.URL || window.webkitURL;
|
126
|
+
let blobUrl = url.createObjectURL(blob);
|
127
|
+
let worker = new Worker(blobUrl);
|
128
|
+
return worker;
|
133
129
|
}
|
134
130
|
|
135
|
-
return cb(null,
|
136
|
-
workerInstance: null, \n
|
131
|
+
return cb(null, `${options.esModule ? 'export default' : 'module.exports ='} {\n
|
137
132
|
workerUrl: __webpack_public_path__ + ${JSON.stringify(entry)}, \n
|
138
133
|
getInstance: ${workerCode} \n
|
139
|
-
}
|
140
|
-
workerObj.getInstance();
|
141
|
-
${options.esModule ? 'export default' : 'module.exports ='} workerObj;
|
142
|
-
`); // return cb(
|
143
|
-
// null,
|
144
|
-
// `${options.esModule ? 'export default' : 'module.exports ='} {\n
|
145
|
-
// workerInstance: null, \n
|
146
|
-
// workerUrl: __webpack_public_path__ + ${JSON.stringify(entry)}, \n
|
147
|
-
// getInstance: ${workerCode} \n
|
148
|
-
// }`
|
149
|
-
// );
|
134
|
+
}`);
|
150
135
|
});
|
151
136
|
}
|
@@ -26,12 +26,6 @@ const defaultHTMLMiniFyOption = {
|
|
26
26
|
removeStyleLinkTypeAttributes: true,
|
27
27
|
useShortDoctype: true
|
28
28
|
};
|
29
|
-
const defaultScriptLoadingStrategy = 'defer';
|
30
|
-
|
31
|
-
function getScriptLoadingStrategy(scriptLoadingStategey) {
|
32
|
-
const allowedScriptLoadingStrategies = ['blocking', 'defer'];
|
33
|
-
return allowedScriptLoadingStrategies.includes(scriptLoadingStategey) ? scriptLoadingStategey : defaultScriptLoadingStrategy;
|
34
|
-
}
|
35
29
|
|
36
30
|
function configHtmlWebpackPlugins(plugins, {
|
37
31
|
enableChunkHash = false,
|
@@ -39,8 +33,7 @@ function configHtmlWebpackPlugins(plugins, {
|
|
39
33
|
inject,
|
40
34
|
crossorigin,
|
41
35
|
hasEFC,
|
42
|
-
minify: minifyHtmlOptions = false
|
43
|
-
scriptLoadingStategey
|
36
|
+
minify: minifyHtmlOptions = false
|
44
37
|
}) {
|
45
38
|
const optionsHtmlWebpack = {
|
46
39
|
chunksSortMode: 'none',
|
@@ -51,7 +44,7 @@ function configHtmlWebpackPlugins(plugins, {
|
|
51
44
|
// ? minifyHtmlOptions
|
52
45
|
// : minifyHtmlOptions,,
|
53
46
|
templateParameters: _common.templateParameters,
|
54
|
-
scriptLoading:
|
47
|
+
scriptLoading: 'defer',
|
55
48
|
inject: inject
|
56
49
|
};
|
57
50
|
|
@@ -60,8 +60,7 @@ const getDevPlugins = (options, publicPath) => {
|
|
60
60
|
mode
|
61
61
|
},
|
62
62
|
htmlTemplate: {
|
63
|
-
inject
|
64
|
-
scriptLoadingStrategy
|
63
|
+
inject
|
65
64
|
},
|
66
65
|
crossorigin
|
67
66
|
},
|
@@ -167,8 +166,7 @@ const getDevPlugins = (options, publicPath) => {
|
|
167
166
|
minify: false,
|
168
167
|
inject,
|
169
168
|
crossorigin,
|
170
|
-
hasEFC
|
171
|
-
scriptLoadingStrategy
|
169
|
+
hasEFC
|
172
170
|
});
|
173
171
|
|
174
172
|
if (hasEFC) {
|
@@ -78,8 +78,7 @@ const getProdPlugins = (options, publicPath = '') => {
|
|
78
78
|
} = options.app;
|
79
79
|
const {
|
80
80
|
inject,
|
81
|
-
minify: minifyHtmlOptions
|
82
|
-
scriptLoadingStategey
|
81
|
+
minify: minifyHtmlOptions
|
83
82
|
} = htmlTemplate;
|
84
83
|
const {
|
85
84
|
i18n
|
@@ -177,7 +176,6 @@ const getProdPlugins = (options, publicPath = '') => {
|
|
177
176
|
folder,
|
178
177
|
inject,
|
179
178
|
minify: minifyHtmlOptions,
|
180
|
-
scriptLoadingStategey,
|
181
179
|
crossorigin,
|
182
180
|
hasEFC
|
183
181
|
});
|