Skip to content

Commit 7f64f32

Browse files
niieanibbrzoska
authored andcommitted
ci: fix build step
1 parent 3dbcfc5 commit 7f64f32

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

webpack.config.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
// call like: yarn webpack build --mode production --entry ./lib/hashids.ts --env moduleTarget=esm --env engineTarget=web --env outDir=dist/umd
22

3-
import path from 'path'
4-
import { Compilation } from 'webpack'
3+
import * as path from 'path'
4+
import webpack from 'webpack'
55
import type { Configuration, Compiler } from 'webpack'
6-
import { ReplaceSource, Source } from 'webpack-sources'
6+
import webpackSources from 'webpack-sources'
7+
import type { Source } from 'webpack-sources'
8+
9+
const __dirname = import.meta.dirname
10+
const { ReplaceSource } = webpackSources
711

812
type ExternalFn = Extract<
913
NonNullable<Configuration['externals']>,
@@ -18,7 +22,8 @@ class PostProcessChunkWebpackPlugin {
1822
compilation.hooks.processAssets.tap(
1923
{
2024
name: 'PostProcessChunkWebpackPlugin',
21-
stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY,
25+
stage:
26+
webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY,
2227
},
2328
(assetRecord) => {
2429
const jsAssets = Object.entries(

0 commit comments

Comments
 (0)