diff --git a/apps/remix-ide/webpack.config.js b/apps/remix-ide/webpack.config.js index bacc6e251e..5fd1bc6787 100644 --- a/apps/remix-ide/webpack.config.js +++ b/apps/remix-ide/webpack.config.js @@ -2,9 +2,20 @@ const nxWebpack = require('@nrwl/react/plugins/webpack') module.exports = config => { const nxWebpackConfig = nxWebpack(config) + const { module, module: { rules } } = nxWebpackConfig return { ...nxWebpackConfig, + module: { + ...module, + rules: [ + ...rules, + { + test: /\.compiler\.js$/, + use: { loader: 'worker-loader' } + } + ] + }, node: { fs: 'empty', tls: 'empty', diff --git a/package-lock.json b/package-lock.json index 34326d7516..3f9d443cd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41124,6 +41124,28 @@ "errno": "~0.1.7" } }, + "worker-loader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-2.0.0.tgz", + "integrity": "sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw==", + "dev": true, + "requires": { + "loader-utils": "^1.0.0", + "schema-utils": "^0.4.0" + }, + "dependencies": { + "schema-utils": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, "worker-plugin": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/worker-plugin/-/worker-plugin-3.2.0.tgz", diff --git a/package.json b/package.json index cefc476b74..019f647699 100644 --- a/package.json +++ b/package.json @@ -253,6 +253,7 @@ "watchify": "^3.9.0", "web3": "1.2.4", "webworkify": "^1.2.1", + "worker-loader": "^2.0.0", "yo-yo": "github:ioedeveloper/yo-yo", "yo-yoify": "^3.7.3" }