Next-plugins: Publish new version of next-workers

Created on 25 Dec 2019  路  2Comments  路  Source: vercel/next-plugins

Can you please publish a new version of @zeit/next-workers that includes the typescript support (#431)?

Most helpful comment

Quick fix for anyone struggling: Install patch-package & use the following:

diff --git a/node_modules/@zeit/next-workers/index.js b/node_modules/@zeit/next-workers/index.js
index 6d65dcf..dfe4ec1 100644
--- a/node_modules/@zeit/next-workers/index.js
+++ b/node_modules/@zeit/next-workers/index.js
@@ -8,7 +8,7 @@ module.exports = (nextConfig = {}) => {
       }

       config.module.rules.push({
-        test: /\.worker\.js$/,
+        test: /\.worker\.(js|ts)$/,
         loader: 'worker-loader',
         options: nextConfig.workerLoaderOptions || {
           name: 'static/[hash].worker.js',

All 2 comments

is there any update on this?

Quick fix for anyone struggling: Install patch-package & use the following:

diff --git a/node_modules/@zeit/next-workers/index.js b/node_modules/@zeit/next-workers/index.js
index 6d65dcf..dfe4ec1 100644
--- a/node_modules/@zeit/next-workers/index.js
+++ b/node_modules/@zeit/next-workers/index.js
@@ -8,7 +8,7 @@ module.exports = (nextConfig = {}) => {
       }

       config.module.rules.push({
-        test: /\.worker\.js$/,
+        test: /\.worker\.(js|ts)$/,
         loader: 'worker-loader',
         options: nextConfig.workerLoaderOptions || {
           name: 'static/[hash].worker.js',

Was this page helpful?
0 / 5 - 0 ratings

Related issues

furedal picture furedal  路  30Comments

mvoloskov picture mvoloskov  路  20Comments

danilofuchs picture danilofuchs  路  12Comments

selique picture selique  路  12Comments

trusktr picture trusktr  路  27Comments