Skip to content

Commit

Permalink
feat: transpile ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Satan-web3 committed Nov 10, 2023
1 parent c69fe9d commit 5cca6ea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"rootDir": "./src",
"strict": true,
"sourceMap": true,
"target": "ES2015",
"target": "ES2022",
"resolveJsonModule": true
},
"exclude": ["src/protocol/**/*"],
Expand Down
39 changes: 15 additions & 24 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,23 @@ module.exports = [
...baseConfig,
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: ['>0.25%', 'not dead'],
},
},
],
],
plugins: basePlugins,
},
},
},
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
configFile: path.resolve(__dirname, 'tsconfig.esm.json'),
},
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: basePlugins,
},
},
{
loader: 'ts-loader',
options: {
configFile: path.resolve(__dirname, 'tsconfig.esm.json'),
},
},
],
exclude: ['/node_modules/', '/test/'],
},
],
Expand Down

0 comments on commit 5cca6ea

Please sign in to comment.