Set up webpack-import-meta-loader

This commit is contained in:
Sam Carlton 2021-01-30 00:46:31 -06:00
parent 6138ff50f8
commit 5b519729d4

View file

@ -328,8 +328,19 @@ export default {
** You can extend webpack config here ** You can extend webpack config here
*/ */
extend(config, ctx) { 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 // Run ESLint on save
if (ctx.isDev && ctx.isClient) { if (ctx.isDev && ctx.isClient) {
config.module.rules.push({ config.module.rules.push({
enforce: 'pre', enforce: 'pre',
test: /\.(js|vue)$/, test: /\.(js|vue)$/,