Skip to content

Commit 3eeb604

Browse files
committed
fix(create-plugin): set __filename for webpack cache deps
1 parent bc1b299 commit 3eeb604

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import CopyWebpackPlugin from 'copy-webpack-plugin';
99
import ESLintPlugin from 'eslint-webpack-plugin';
1010
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
1111
import path from 'path';
12+
import { fileURLToPath } from 'node:url';
1213
import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin';
1314
import TerserPlugin from 'terser-webpack-plugin';
1415
import { SubresourceIntegrityPlugin } from "webpack-subresource-integrity";
@@ -38,6 +39,8 @@ export type Env = {
3839
[key: string]: true | string | Env;
3940
};
4041

42+
const __filename = fileURLToPath(import.meta.url);
43+
4144
const config = async (env: Env): Promise<Configuration> => {
4245
const baseConfig: Configuration = {
4346
cache: {

0 commit comments

Comments
 (0)