mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-21 06:54:08 -07:00
Set up webpack-import-meta-loader
This commit is contained in:
parent
6138ff50f8
commit
5b519729d4
1 changed files with 11 additions and 0 deletions
|
|
@ -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)$/,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue