Skip to content

Commit baf4f19

Browse files
authored
Merge pull request #20777 from davelopez/client_build_stability
Stabilize client build after client-dev-server
2 parents 077cd12 + 4ce6f56 commit baf4f19

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

client-api/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "es2020",
4-
"module": "es2020",
3+
"target": "es2022",
4+
"module": "es2022",
55
"moduleResolution": "node",
66

77
"verbatimModuleSyntax": true,

client-api/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default defineConfig({
88
clean: true,
99
treeshake: true,
1010
minify: false,
11-
target: 'es2020',
11+
target: 'es2022',
1212
esbuildOptions(options) {
1313
options.external = [
1414
...options.external || [],

client/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "@vue/tsconfig/tsconfig.json",
33
"compilerOptions": {
4-
"target": "es2020",
5-
"module": "es2020",
4+
"target": "es2022",
5+
"module": "es2022",
66
"moduleResolution": "Bundler",
77

88
"verbatimModuleSyntax": true,

client/webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ const buildDate = new Date();
3838
module.exports = (env = {}, argv = {}) => {
3939
// environment name based on -d, -p, webpack flag
4040
const targetEnv = process.env.NODE_ENV == "production" || argv.mode == "production" ? "production" : "development";
41+
// Detect if running under webpack-dev-server
42+
const isDevServer = argv.$0 && argv.$0.includes("webpack-dev-server");
4143

4244
let minimizations = {};
4345
if (targetEnv == "production") {
@@ -323,6 +325,9 @@ module.exports = (env = {}, argv = {}) => {
323325
buildDependencies: {
324326
config: [__filename],
325327
},
328+
// Use different cache directories for dev server vs regular build
329+
// to prevent conflicts when switching between modes
330+
name: isDevServer ? "dev-server" : "build",
326331
},
327332
devServer: {
328333
client: {

0 commit comments

Comments
 (0)