You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specify the default type of externals as`'node-commonjs'`. Webpack will import [`createRequire`](https://nodejs.org/api/module.html#module_module_createrequire_filename) from `'module'` to construct a require function for loading externals used in a module.
Specify the default type of externals as`'script'`. Webpack will Load the external as a script exposing predefined global variables with HTML `<script>`element. The `<script>`tag would be removed after the script has been loaded.
393
+
将 externals 类型设置为`'script'`,webpack 将会通过 HTML 中的 `<script>`标签加载一个脚本,以暴露预定义的全局变量。当脚本被加载完后 `<script>`标签会被删除。
0 commit comments