Skip to content

Commit

Permalink
Use ES2020 for better compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-markl committed Dec 27, 2023
1 parent 635b5a2 commit df89f90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function compile (fileNames: string[], options: CompilerOptions): Record<string,
type: 'es6'
},
jsc: {
target: 'es2022',
target: 'es2020',
experimental: {
plugins: [
[
Expand Down Expand Up @@ -102,7 +102,7 @@ function compile (fileNames: string[], options: CompilerOptions): Record<string,
type: 'commonjs'
},
jsc: {
target: 'es2022',
target: 'es2020',
experimental: {
plugins: [
[
Expand Down
3 changes: 1 addition & 2 deletions tools/demo.webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ const webpackConfig: webpack.Configuration = {
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules\/.*/,
test: /\.tsx?|\.js$/,
loader: 'swc-loader',
options: {
jsc: {
Expand Down

0 comments on commit df89f90

Please sign in to comment.