Skip to content

Commit aa20eaa

Browse files
authored
refactor(bundler-webpack): replace webpack-5-chain with webpack-v5-chain (#1650)
1 parent 523e202 commit aa20eaa

23 files changed

+46
-51
lines changed

packages/bundler-webpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
"vue-loader": "^17.4.2",
6161
"vue-router": "catalog:",
6262
"webpack": "^5.99.7",
63-
"webpack-5-chain": "^8.0.2",
6463
"webpack-dev-server": "^5.2.1",
65-
"webpack-merge": "^6.0.1"
64+
"webpack-merge": "^6.0.1",
65+
"webpack-v5-chain": "^1.0.0"
6666
},
6767
"publishConfig": {
6868
"access": "public"

packages/bundler-webpack/src/build/createClientConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import CopyWebpackPlugin from 'copy-webpack-plugin'
55
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'
66
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
77
import type { Module } from 'webpack'
8-
import type Config from 'webpack-5-chain'
8+
import type { Config } from 'webpack-v5-chain'
99
import { createClientBaseConfig } from '../config/index.js'
1010
import type { WebpackBundlerOptions } from '../types.js'
1111
import { createClientPlugin } from './createClientPlugin.js'

packages/bundler-webpack/src/build/createServerConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createRequire } from 'node:module'
22
import type { App } from '@vuepress/core'
3-
import type Config from 'webpack-5-chain'
3+
import type { Config } from 'webpack-v5-chain'
44
import { createBaseConfig } from '../config/index.js'
55
import type { WebpackBundlerOptions } from '../types.js'
66

packages/bundler-webpack/src/config/createBaseConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { App } from '@vuepress/core'
2-
import Config from 'webpack-5-chain'
2+
import { Config } from 'webpack-v5-chain'
33
import type { WebpackBundlerOptions } from '../types.js'
44
import { handleDevtool } from './handleDevtool.js'
55
import { handleEntry } from './handleEntry.js'
@@ -21,7 +21,7 @@ export const createBaseConfig = async ({
2121
isBuild: boolean
2222
isServer: boolean
2323
}): Promise<Config> => {
24-
// create new webpack-5-chain config
24+
// create new webpack-v5-chain config
2525
const config = new Config()
2626

2727
/**

packages/bundler-webpack/src/config/createClientBaseConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { App } from '@vuepress/core'
2-
import type Config from 'webpack-5-chain'
2+
import type { Config } from 'webpack-v5-chain'
33
import type { WebpackBundlerOptions } from '../types.js'
44
import { createBaseConfig } from './createBaseConfig.js'
55

packages/bundler-webpack/src/config/handleDevtool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { App } from '@vuepress/core'
2-
import type Config from 'webpack-5-chain'
2+
import type { Config } from 'webpack-v5-chain'
33

44
/**
55
* Set webpack devtool

packages/bundler-webpack/src/config/handleEntry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { App } from '@vuepress/core'
22
import { fs } from '@vuepress/utils'
3-
import type Config from 'webpack-5-chain'
3+
import type { Config } from 'webpack-v5-chain'
44

55
/**
66
* Set webpack entry

packages/bundler-webpack/src/config/handleMode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { App } from '@vuepress/core'
2-
import type Config from 'webpack-5-chain'
2+
import type { Config } from 'webpack-v5-chain'
33

44
/**
55
* Set webpack mode

packages/bundler-webpack/src/config/handleModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type Config from 'webpack-5-chain'
1+
import type { Config } from 'webpack-v5-chain'
22
import type { WebpackBundlerOptions } from '../types.js'
33
import { handleModuleAssets } from './handleModuleAssets.js'
44
import { handleModuleJs } from './handleModuleJs.js'

packages/bundler-webpack/src/config/handleModuleAssets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type Config from 'webpack-5-chain'
1+
import type { Config } from 'webpack-v5-chain'
22

33
/**
44
* Set webpack config to handle assets files

0 commit comments

Comments
 (0)