From 5b519729d48ee91ce69228636305bd8aa6878f54 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sat, 30 Jan 2021 00:46:31 -0600 Subject: [PATCH] Set up webpack-import-meta-loader --- nuxt.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nuxt.config.js b/nuxt.config.js index d66fdb0..c97150b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -328,8 +328,19 @@ export default { ** You can extend webpack config here */ extend(config, ctx) { + + // Client + if (ctx.isClient) { + // Push meta import rule for zip.js + config.module.rules.push({ + test: /\.js$/, + loader: require.resolve('@open-wc/webpack-import-meta-loader') + }) + } + // Run ESLint on save if (ctx.isDev && ctx.isClient) { + config.module.rules.push({ enforce: 'pre', test: /\.(js|vue)$/,