Closed splincode closed 7 years ago
webpack.common.js
let plugins = [ new ScriptExtHtmlWebpackPlugin({ sync: /polyfill|vendor/, defaultAttribute: 'async', preload: [/polyfill|vendor|main/], prefetch: [/chunk/] }), ];
ERROR in TypeError: patterns.some is not a function - index.js:44 matches [ui-util]/[script-ext-html-webpack-plugin]/index.js:44:19 - index.js:60 ATTRIBUTE_PRIORITIES.forEach [ui-util]/[script-ext-html-webpack-plugin]/index.js:60:38 - Array.forEach - index.js:59 generateSrcScriptElement [ui-util]/[script-ext-html-webpack-plugin]/index.js:59:24 - index.js:37 htmlPluginData.html.htmlPluginData.html.replace [ui-util]/[script-ext-html-webpack-plugin]/index.js:37:14 - String.replace - index.js:32 replaceScriptElements [ui-util]/[script-ext-html-webpack-plugin]/index.js:32:45 - index.js:88 Compilation.compilation.plugin [ui-util]/[script-ext-html-webpack-plugin]/index.js:88:11 - Tapable.js:208 Compilation.applyPluginsAsyncWaterfall [ui-util]/[tapable]/lib/Tapable.js:208:13 - util.js:16 Compilation.tryCatcher [ui-util]/[bluebird]/js/release/util.js:16:23 - index.js:159 [ui-util]/[html-webpack-plugin]/index.js:159:16 - util.js:16 tryCatcher [ui-util]/[bluebird]/js/release/util.js:16:23 - promise.js:512 Promise._settlePromiseFromHandler [ui-util]/[bluebird]/js/release/promise.js:512:31 - promise.js:569 Promise._settlePromise [ui-util]/[bluebird]/js/release/promise.js:569:18 - promise.js:614 Promise._settlePromise0 [ui-util]/[bluebird]/js/release/promise.js:614:10 - promise.js:693 Promise._settlePromises [ui-util]/[bluebird]/js/release/promise.js:693:18 - async.js:133 Async._drainQueue [ui-util]/[bluebird]/js/release/async.js:133:16 - async.js:143 Async._drainQueues [ui-util]/[bluebird]/js/release/async.js:143:10 - async.js:17 Immediate.Async.drainQueues [ui-util]/[bluebird]/js/release/async.js:17:14
Hiya, Should your regex expressions be wrapped with slashes rather than square brackets? ie:
preload: /polyfill|vendor|main/, prefetch: /chunk/
webpack.common.js