Skip to content

Commit 9b71994

Browse files
committed
fix: export webpack plugin
fixes #329
1 parent 4512234 commit 9b71994

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/webpack-plugin/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
".": {
1010
"import": "./dist/index.mjs",
1111
"require": "./dist/index.cjs"
12+
},
13+
"./scriptLoader": {
14+
"import": "./dist/scriptLoader.mjs",
15+
"require": "./dist/scriptLoader.cjs"
1216
}
1317
},
1418
"repository": {

packages/webpack-plugin/src/plugin.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { createRequire } from 'node:module'
21
import { URLSearchParams } from 'url'
32
import { writeFile } from 'fs/promises'
43

@@ -35,7 +34,6 @@ export class VuetifyPlugin {
3534

3635
async apply (compiler: Compiler) {
3736
if (this.options.autoImport) {
38-
const require = createRequire(import.meta.url)
3937
compiler.options.module.rules.unshift({
4038
resourceQuery: query => {
4139
if (!query) return false
@@ -46,7 +44,7 @@ export class VuetifyPlugin {
4644
)
4745
},
4846
use: {
49-
loader: require.resolve('./scriptLoader'),
47+
loader: 'webpack-plugin-vuetify/scriptLoader',
5048
options: this.options
5149
},
5250
})

0 commit comments

Comments
 (0)