Skip to content

Commit

Permalink
fix: export webpack plugin
Browse files Browse the repository at this point in the history
fixes #329
  • Loading branch information
KaelWD committed Feb 28, 2024
1 parent 4512234 commit 9b71994
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./scriptLoader": {
"import": "./dist/scriptLoader.mjs",
"require": "./dist/scriptLoader.cjs"
}
},
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions packages/webpack-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { createRequire } from 'node:module'
import { URLSearchParams } from 'url'
import { writeFile } from 'fs/promises'

Expand Down Expand Up @@ -35,7 +34,6 @@ export class VuetifyPlugin {

async apply (compiler: Compiler) {
if (this.options.autoImport) {
const require = createRequire(import.meta.url)
compiler.options.module.rules.unshift({
resourceQuery: query => {
if (!query) return false
Expand All @@ -46,7 +44,7 @@ export class VuetifyPlugin {
)
},
use: {
loader: require.resolve('./scriptLoader'),
loader: 'webpack-plugin-vuetify/scriptLoader',
options: this.options
},
})
Expand Down

0 comments on commit 9b71994

Please sign in to comment.