Skip to content

Commit 1f1340b

Browse files
committed
Fix resolve type
1 parent eae428a commit 1f1340b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/webpack-plugin": patch
3+
---
4+
5+
Fix resolve type

packages/webpack-plugin/src/plugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
stat,
66
writeFileSync,
77
} from 'node:fs'
8+
import { createRequire } from 'node:module'
89
import { dirname, join } from 'node:path'
910
import { fileURLToPath } from 'node:url'
1011

@@ -106,7 +107,9 @@ export class DevupUIWebpackPlugin {
106107
exclude: /node_modules/,
107108
use: [
108109
{
109-
loader: join(_dirname, 'loader.js'),
110+
loader: createRequire(import.meta.url).resolve(
111+
'@devup-ui/webpack-plugin/loader',
112+
),
110113
options: {
111114
package: this.options.package,
112115
cssFile: this.options.cssFile,

0 commit comments

Comments
 (0)