Skip to content

Commit 7a3c76a

Browse files
committed
feat(create-plugin): more support node 24 in webpack config
1 parent fa5e750 commit 7a3c76a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/create-plugin/templates/common/.config/webpack/BuildModeWebpackPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as webpack from 'webpack';
1+
import webpack, { type Compiler } from 'webpack';
22

33
const PLUGIN_NAME = 'BuildModeWebpack';
44

packages/create-plugin/templates/common/.config/webpack/webpack.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ const config = async (env: Env): Promise<Configuration> => {
4343
cache: {
4444
type: 'filesystem',
4545
buildDependencies: {
46-
config: [__filename],
46+
// __filename doesnt work in Node 24
47+
config: [path.resolve(process.cwd(), '.config', 'webpack', 'webpack.config.ts')],
4748
},
4849
},
4950

0 commit comments

Comments
 (0)