diff --git a/.eslintignore b/.eslintignore index b43bf86..b3e0256 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,4 @@ README.md +__tests__/cases/**/dist +__tests__/cases/**/expected +dist diff --git a/.eslintrc b/.eslintrc index dd1445f..b0f479e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -3,6 +3,10 @@ "plugins": [ "@typescript-eslint" ], + "env": { + "browser": true, + "node": true + }, "extends": [ "eslint:recommended", "airbnb-base", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32cd7de..5de605f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-18.04 strategy: matrix: - node-version: [12.x, 14.x] + node-version: [12.x, 14.x, 16.x] env: HUSKY: 0 steps: diff --git a/__tests__/HtmlInlineScriptPlugin.test.ts b/__tests__/HtmlInlineScriptPlugin.test.ts index 55be272..516b861 100644 --- a/__tests__/HtmlInlineScriptPlugin.test.ts +++ b/__tests__/HtmlInlineScriptPlugin.test.ts @@ -3,6 +3,9 @@ import path from 'path'; import webpack from 'webpack'; import simpleConfig from './cases/simple/webpack.config'; import multipleInstanceConfig from './cases/multiple-instance/webpack.config'; +import jsWithImportConfig from './cases/js-with-import/webpack.config'; +import webWorkerConfig from './cases/web-worker/webpack.config'; +import inlineWebWorkerConfig from './cases/inline-web-worker/webpack.config'; describe('HtmlInlineScriptPlugin', () => { it('should build simple webpack config without error', async () => { @@ -25,6 +28,11 @@ describe('HtmlInlineScriptPlugin', () => { 'utf8', ); expect(result).toBe(expected); + + const expectedFileList = fs.readdirSync(path.join(__dirname, 'cases/simple/expected/')); + const generatedFileList = fs.readdirSync(path.join(__dirname, 'cases/simple/dist/')); + expect(expectedFileList.sort()).toEqual(generatedFileList.sort()); + resolve(true); }); }); @@ -65,6 +73,122 @@ describe('HtmlInlineScriptPlugin', () => { ); expect(result2).toBe(expected2); + + const expectedFileList = fs.readdirSync(path.join(__dirname, 'cases/multiple-instance/expected/')); + const generatedFileList = fs.readdirSync(path.join(__dirname, 'cases/multiple-instance/dist/')); + expect(expectedFileList.sort()).toEqual(generatedFileList.sort()); + + resolve(true); + }); + }); + + await webpackPromise; + }); + + it('should build webpack config having JS file with import without error', async () => { + const webpackPromise = new Promise((resolve) => { + const compiler = webpack(jsWithImportConfig); + + compiler.run((error, stats) => { + expect(error).toBeNull(); + + const statsErrors = stats?.compilation.errors; + expect(statsErrors?.length).toBe(0); + + const result1 = fs.readFileSync( + path.join(__dirname, 'cases/js-with-import/dist/index.html'), + 'utf8', + ); + + const expected1 = fs.readFileSync( + path.join(__dirname, 'cases/js-with-import/expected/index.html'), + 'utf8', + ); + + expect(result1).toBe(expected1); + + const expectedFileList = fs.readdirSync(path.join(__dirname, 'cases/js-with-import/expected/')); + const generatedFileList = fs.readdirSync(path.join(__dirname, 'cases/js-with-import/dist/')); + expect(expectedFileList.sort()).toEqual(generatedFileList.sort()); + + resolve(true); + }); + }); + + await webpackPromise; + }); + + it('should build webpack config having web worker without error', async () => { + const webpackPromise = new Promise((resolve) => { + const compiler = webpack(webWorkerConfig); + + compiler.run((error, stats) => { + expect(error).toBeNull(); + + const statsErrors = stats?.compilation.errors; + expect(statsErrors?.length).toBe(0); + + const result1 = fs.readFileSync( + path.join(__dirname, 'cases/web-worker/dist/index.html'), + 'utf8', + ); + + const expected1 = fs.readFileSync( + path.join(__dirname, 'cases/web-worker/expected/index.html'), + 'utf8', + ); + + expect(result1).toBe(expected1); + + const result2 = fs.readFileSync( + path.join(__dirname, 'cases/web-worker/dist/test.worker.js'), + 'utf8', + ); + + const expected2 = fs.readFileSync( + path.join(__dirname, 'cases/web-worker/expected/test.worker.js'), + 'utf8', + ); + + expect(result2).toBe(expected2); + + const expectedFileList = fs.readdirSync(path.join(__dirname, 'cases/web-worker/expected/')); + const generatedFileList = fs.readdirSync(path.join(__dirname, 'cases/web-worker/dist/')); + expect(expectedFileList.sort()).toEqual(generatedFileList.sort()); + + resolve(true); + }); + }); + + await webpackPromise; + }); + + it('should build webpack config having inline web worker without error', async () => { + const webpackPromise = new Promise((resolve) => { + const compiler = webpack(inlineWebWorkerConfig); + + compiler.run((error, stats) => { + expect(error).toBeNull(); + + const statsErrors = stats?.compilation.errors; + expect(statsErrors?.length).toBe(0); + + const result1 = fs.readFileSync( + path.join(__dirname, 'cases/inline-web-worker/dist/index.html'), + 'utf8', + ); + + const expected1 = fs.readFileSync( + path.join(__dirname, 'cases/inline-web-worker/expected/index.html'), + 'utf8', + ); + + expect(result1).toBe(expected1); + + const expectedFileList = fs.readdirSync(path.join(__dirname, 'cases/inline-web-worker/expected/')); + const generatedFileList = fs.readdirSync(path.join(__dirname, 'cases/inline-web-worker/dist/')); + expect(expectedFileList.sort()).toEqual(generatedFileList.sort()); + resolve(true); }); }); diff --git a/__tests__/cases/inline-web-worker/expected/index.html b/__tests__/cases/inline-web-worker/expected/index.html new file mode 100644 index 0000000..52f78e6 --- /dev/null +++ b/__tests__/cases/inline-web-worker/expected/index.html @@ -0,0 +1 @@ +
This is minimal code to demonstrate webpack usage
\ No newline at end of file diff --git a/__tests__/cases/inline-web-worker/fixtures/index.html b/__tests__/cases/inline-web-worker/fixtures/index.html new file mode 100644 index 0000000..a2e082c --- /dev/null +++ b/__tests__/cases/inline-web-worker/fixtures/index.html @@ -0,0 +1,15 @@ + + + + + + + + +This is minimal code to demonstrate webpack usage
+ + + diff --git a/__tests__/cases/inline-web-worker/fixtures/index.js b/__tests__/cases/inline-web-worker/fixtures/index.js new file mode 100644 index 0000000..c639e6b --- /dev/null +++ b/__tests__/cases/inline-web-worker/fixtures/index.js @@ -0,0 +1,34 @@ +// This file will be loaded as raw text as configured via webpack and raw-loader +import workerSource from './worker'; + +const blob = new Blob([ + workerSource +]); + +const blobURL = window.URL.createObjectURL(blob); + +const worker = new Worker(blobURL); + +let result; + +worker.onmessage = function (event) { + if (!result) { + result = document.createElement('div'); + result.setAttribute('id', 'result'); + + document.body.append(result); + } + + const record = document.createElement('pre'); + record.innerHTML = JSON.stringify(event.data); + + result.append(record); +}; + +window.addEventListener('load', () => { + const button = document.getElementById('button'); + + button.addEventListener('click', () => { + worker.postMessage({ postMessage: true }); + }); +}); diff --git a/__tests__/cases/inline-web-worker/fixtures/worker.js b/__tests__/cases/inline-web-worker/fixtures/worker.js new file mode 100644 index 0000000..98adbd1 --- /dev/null +++ b/__tests__/cases/inline-web-worker/fixtures/worker.js @@ -0,0 +1,7 @@ +onmessage = function (event) { + const workerResult = { timestamp: Date.now(), ...event.data }; + + workerResult.onmessage = true; + + postMessage(workerResult); +}; diff --git a/__tests__/cases/inline-web-worker/webpack.config.ts b/__tests__/cases/inline-web-worker/webpack.config.ts new file mode 100644 index 0000000..f268077 --- /dev/null +++ b/__tests__/cases/inline-web-worker/webpack.config.ts @@ -0,0 +1,31 @@ +import path from 'path'; +import type { Configuration } from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import Self from '../../../dist'; + +const config: Configuration = { + mode: 'production', + entry: path.join(__dirname, './fixtures/index.js'), + output: { + path: path.join(__dirname, './dist'), + filename: '[name].js' + }, + plugins: [ + new HtmlWebpackPlugin({ + template: path.resolve(__dirname, './fixtures/index.html') + }), + new Self() + ], + module: { + rules: [ + { + test: /worker\.js$/, + use: { + loader: 'raw-loader' + } + } + ] + } +}; + +export default config; diff --git a/__tests__/cases/js-with-import/expected/index.html b/__tests__/cases/js-with-import/expected/index.html new file mode 100644 index 0000000..3dbf563 --- /dev/null +++ b/__tests__/cases/js-with-import/expected/index.html @@ -0,0 +1 @@ +This is minimal code to demonstrate webpack usage
\ No newline at end of file diff --git a/__tests__/cases/js-with-import/fixtures/app.js b/__tests__/cases/js-with-import/fixtures/app.js new file mode 100644 index 0000000..2ce7e4a --- /dev/null +++ b/__tests__/cases/js-with-import/fixtures/app.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line no-console +console.log('Hello world'); diff --git a/__tests__/cases/js-with-import/fixtures/index.html b/__tests__/cases/js-with-import/fixtures/index.html new file mode 100644 index 0000000..c061c8e --- /dev/null +++ b/__tests__/cases/js-with-import/fixtures/index.html @@ -0,0 +1,14 @@ + + + + + + + + +This is minimal code to demonstrate webpack usage
+ + diff --git a/__tests__/cases/js-with-import/fixtures/index.js b/__tests__/cases/js-with-import/fixtures/index.js new file mode 100644 index 0000000..36c3352 --- /dev/null +++ b/__tests__/cases/js-with-import/fixtures/index.js @@ -0,0 +1 @@ +import './app'; diff --git a/__tests__/cases/js-with-import/webpack.config.ts b/__tests__/cases/js-with-import/webpack.config.ts new file mode 100644 index 0000000..e163c0b --- /dev/null +++ b/__tests__/cases/js-with-import/webpack.config.ts @@ -0,0 +1,21 @@ +import path from 'path'; +import type { Configuration } from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import Self from '../../../dist'; + +const config: Configuration = { + mode: 'production', + entry: path.join(__dirname, './fixtures/index.js'), + output: { + path: path.join(__dirname, './dist'), + filename: '[name].js' + }, + plugins: [ + new HtmlWebpackPlugin({ + template: path.resolve(__dirname, './fixtures/index.html') + }), + new Self() + ] +}; + +export default config; diff --git a/__tests__/cases/web-worker/expected/index.html b/__tests__/cases/web-worker/expected/index.html new file mode 100644 index 0000000..2b57078 --- /dev/null +++ b/__tests__/cases/web-worker/expected/index.html @@ -0,0 +1 @@ +This is minimal code to demonstrate webpack usage
\ No newline at end of file diff --git a/__tests__/cases/web-worker/expected/test.worker.js b/__tests__/cases/web-worker/expected/test.worker.js new file mode 100644 index 0000000..e1acf79 --- /dev/null +++ b/__tests__/cases/web-worker/expected/test.worker.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){onmessage=function(e){const t={timestamp:Date.now(),...e.data};t.onmessage=!0,postMessage(t)}}]); \ No newline at end of file diff --git a/__tests__/cases/web-worker/fixtures/index.html b/__tests__/cases/web-worker/fixtures/index.html new file mode 100644 index 0000000..a2e082c --- /dev/null +++ b/__tests__/cases/web-worker/fixtures/index.html @@ -0,0 +1,15 @@ + + + + + + + + +This is minimal code to demonstrate webpack usage
+ + + diff --git a/__tests__/cases/web-worker/fixtures/index.js b/__tests__/cases/web-worker/fixtures/index.js new file mode 100644 index 0000000..06b7b5e --- /dev/null +++ b/__tests__/cases/web-worker/fixtures/index.js @@ -0,0 +1,27 @@ +import Worker from './worker'; + +const worker = new Worker(); + +let result; + +worker.onmessage = function (event) { + if (!result) { + result = document.createElement('div'); + result.setAttribute('id', 'result'); + + document.body.append(result); + } + + const record = document.createElement('pre'); + record.innerHTML = JSON.stringify(event.data); + + result.append(record); +}; + +window.addEventListener('load', () => { + const button = document.getElementById('button'); + + button.addEventListener('click', () => { + worker.postMessage({ postMessage: true }); + }); +}); diff --git a/__tests__/cases/web-worker/fixtures/worker.js b/__tests__/cases/web-worker/fixtures/worker.js new file mode 100644 index 0000000..98adbd1 --- /dev/null +++ b/__tests__/cases/web-worker/fixtures/worker.js @@ -0,0 +1,7 @@ +onmessage = function (event) { + const workerResult = { timestamp: Date.now(), ...event.data }; + + workerResult.onmessage = true; + + postMessage(workerResult); +}; diff --git a/__tests__/cases/web-worker/webpack.config.ts b/__tests__/cases/web-worker/webpack.config.ts new file mode 100644 index 0000000..58d0705 --- /dev/null +++ b/__tests__/cases/web-worker/webpack.config.ts @@ -0,0 +1,32 @@ +import path from 'path'; +import type { Configuration } from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import Self from '../../../dist'; + +const config: Configuration = { + mode: 'production', + entry: path.join(__dirname, './fixtures/index.js'), + output: { + path: path.join(__dirname, './dist'), + filename: '[name].js' + }, + plugins: [ + new HtmlWebpackPlugin({ + template: path.resolve(__dirname, './fixtures/index.html') + }), + new Self() + ], + module: { + rules: [ + { + test: /worker\.js$/, + use: { + loader: 'worker-loader', + options: { filename: 'test.worker.js' } + } + } + ] + } +}; + +export default config; diff --git a/package.json b/package.json index 950cbff..9eb771b 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,10 @@ "lint-staged": "^11.0.0", "pinst": "^2.1.6", "prettier": "^2.0.5", + "raw-loader": "^4.0.2", "ts-jest": "^26.5.3", - "typescript": "^4.1.3" + "typescript": "^4.1.3", + "worker-loader": "^3.0.8" }, "peerDependencies": { "@types/webpack": "^4.41.28", diff --git a/src/HtmlInlineScriptPlugin.ts b/src/HtmlInlineScriptPlugin.ts index 6d6512e..7563693 100644 --- a/src/HtmlInlineScriptPlugin.ts +++ b/src/HtmlInlineScriptPlugin.ts @@ -7,8 +7,11 @@ import { PLUGIN_PREFIX } from './constants'; class HtmlInlineScriptPlugin implements Plugin { tests: RegExp[]; + processedScriptFiles: string[]; + constructor(tests?: RegExp[]) { this.tests = tests || [/.+[.]js$/]; + this.processedScriptFiles = []; } isFileNeedsToBeInlined( @@ -41,6 +44,8 @@ class HtmlInlineScriptPlugin implements Plugin { // eslint-disable-next-line @typescript-eslint/no-unused-vars const { src, ...attributesWithoutSrc } = tag.attributes; + this.processedScriptFiles.push(scriptName); + return { tagName: 'script', innerHTML: asset.source(), @@ -68,10 +73,8 @@ class HtmlInlineScriptPlugin implements Plugin { }); compiler.hooks.emit.tap(`${PLUGIN_PREFIX}_emit`, (compilation) => { - Object.keys(compilation.assets).forEach((assetName) => { - if (this.isFileNeedsToBeInlined(assetName)) { - delete compilation.assets[assetName]; - } + this.processedScriptFiles.forEach((assetName) => { + delete compilation.assets[assetName]; }); }); } diff --git a/yarn.lock b/yarn.lock index 89cfacc..4583f21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -821,7 +821,7 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== -"@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== @@ -1083,7 +1083,12 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1355,6 +1360,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1943,6 +1953,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -3829,6 +3844,15 @@ listr2@^3.12.2: through "^2.3.8" wrap-ansi "^7.0.0" +loader-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" + integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -4558,6 +4582,14 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== +raw-loader@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" + integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + react-is@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" @@ -4809,6 +4841,15 @@ saxes@^5.0.0: dependencies: xmlchars "^2.2.0" +schema-utils@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -5644,6 +5685,14 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +worker-loader@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-3.0.8.tgz#5fc5cda4a3d3163d9c274a4e3a811ce8b60dbb37" + integrity sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"