@hippy/hippy-dynamic-import-plugin
Advanced tools
Comparing version 2.0.1 to 2.0.2
24
index.js
@@ -131,14 +131,14 @@ const Template = require('webpack/lib/Template'); | ||
global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__ | ||
&& 'if(!global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__) {', | ||
Template.indent([ | ||
'try {', | ||
Template.indent([ | ||
`var stringifiedMap = JSON.parse('${JSON.stringify(global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__)}');`, | ||
`global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__ = stringifiedMap;`, | ||
]), | ||
`} catch(err) {`, | ||
Template.indent([`console.error('parse __DYNAMIC_LOAD_CUSTOM_PATH_MAP__ error', err);`,]), | ||
`}`, | ||
]), | ||
'}', | ||
? 'if(!global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__) {' + | ||
Template.indent([ | ||
'try {', | ||
Template.indent([ | ||
`var stringifiedMap = JSON.parse('${JSON.stringify(global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__)}');`, | ||
`global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__ = stringifiedMap;`, | ||
]), | ||
`} catch(err) {`, | ||
Template.indent([`console.error('parse __DYNAMIC_LOAD_CUSTOM_PATH_MAP__ error', err);`,]), | ||
`}`, | ||
]) + | ||
'}' : '', | ||
`var path = jsonpScriptSrc(chunkId);`, | ||
@@ -145,0 +145,0 @@ `if (path && global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__) {`, |
{ | ||
"name": "@hippy/hippy-dynamic-import-plugin", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "hippy webpack打包动态加载chunk包插件", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9903