Skip to content

Commit 47fd989

Browse files
authored
feat: update tsconfig.json and build configs to ES2022 (#1160)
1 parent 15411e6 commit 47fd989

File tree

25 files changed

+34
-39
lines changed

25 files changed

+34
-39
lines changed

examples/module-federation/mf-host/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
4-
"lib": ["DOM", "ES2020"],
3+
"lib": ["DOM", "ES2022"],
54
"module": "ESNext",
65
"jsx": "react-jsx",
76
"noEmit": true,

examples/module-federation/mf-remote/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
4-
"lib": ["DOM", "ES2020"],
3+
"lib": ["DOM", "ES2022"],
54
"module": "ESNext",
65
"jsx": "react-jsx",
76
"noEmit": true,

examples/vue-component-bundle/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"compilerOptions": {
3-
"lib": ["DOM", "ES2020"],
3+
"lib": ["DOM", "ES2022"],
44
"jsx": "preserve",
5-
"target": "ES2020",
65
"skipLibCheck": true,
76
"jsxImportSource": "vue",
87
"useDefineForClassFields": true,

examples/vue-component-bundleless/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"compilerOptions": {
3-
"lib": ["DOM", "ES2020"],
3+
"lib": ["DOM", "ES2022"],
44
"jsx": "preserve",
5-
"target": "ES2020",
65
"skipLibCheck": true,
76
"jsxImportSource": "vue",
87
"useDefineForClassFields": true,

packages/core/rslib.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import fs from 'node:fs';
22
import path from 'node:path';
3-
import type { RsbuildPlugin } from '@rsbuild/core';
43
import { pluginPublint } from 'rsbuild-plugin-publint';
5-
import { defineConfig, rspack } from 'rslib';
4+
import { defineConfig, type rsbuild, rspack } from 'rslib';
65

7-
const pluginFixDtsTypes: RsbuildPlugin = {
6+
const pluginFixDtsTypes: rsbuild.RsbuildPlugin = {
87
name: 'fix-dts-types',
98
setup(api) {
109
api.onAfterBuild(() => {
@@ -29,7 +28,7 @@ export default defineConfig({
2928
lib: [
3029
{
3130
format: 'esm',
32-
syntax: ['node 16'],
31+
syntax: ['node 18.12.0'],
3332
dts: {
3433
bundle: false,
3534
distPath: './dist-types',

packages/create-rslib/fragments/base/node-dual-ts/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"lib": ["ES2021"],
3+
"lib": ["ES2022"],
44
"module": "ESNext",
55
"noEmit": true,
66
"strict": true,

packages/create-rslib/fragments/base/node-esm-ts/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"lib": ["ES2021"],
3+
"lib": ["ES2022"],
44
"module": "ESNext",
55
"noEmit": true,
66
"strict": true,

packages/create-rslib/fragments/base/react-ts/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"lib": ["DOM", "ES2021"],
3+
"lib": ["DOM", "ES2022"],
44
"module": "ESNext",
55
"jsx": "react-jsx",
66
"strict": true,

packages/create-rslib/fragments/base/vue-ts/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"compilerOptions": {
3-
"lib": ["DOM", "ES2020"],
3+
"lib": ["DOM", "ES2022"],
44
"jsx": "preserve",
5-
"target": "ES2020",
65
"skipLibCheck": true,
76
"jsxImportSource": "vue",
87
"useDefineForClassFields": true,

packages/create-rslib/rslib.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import { defineConfig } from 'rslib';
44
const { execSync } = require('node:child_process');
55

66
export default defineConfig({
7-
lib: [{ format: 'esm' }],
7+
lib: [
8+
{
9+
format: 'esm',
10+
syntax: ['node 18.12.0'],
11+
},
12+
],
813
plugins: [
914
pluginPublint(),
1015
{

0 commit comments

Comments
 (0)