Skip to content

Commit

Permalink
add typescript support for app code
Browse files Browse the repository at this point in the history
(cherry picked from commit 7952ceb)
  • Loading branch information
fire332 committed Dec 25, 2024
1 parent 2f9739d commit 215af2c
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ function makeConfig(api) {
noNewArrows: true
},
plugins: [
[
'@babel/plugin-transform-typescript',
{
strictMode: true
}
],
[
'@babel/plugin-transform-runtime',
{
Expand Down
37 changes: 37 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/plugin-transform-runtime": "^7.25.9",
"@babel/plugin-transform-typescript": "^7.26.3",
"@babel/preset-env": "^7.26.0",
"@eslint/js": "^9.17.0",
"@stylistic/eslint-plugin": "^2.12.1",
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const makeConfig = () => [
},

resolve: {
extensions: ['.mjs', '.cjs', '.js', '.json']
extensions: ['.mjs', '.cjs', '.js', '.json', '.ts']
},

module: {
rules: [
{
test: /\.[mc]?js$/i,
test: /\.[mc]?[jt]s$/i,

loader: 'babel-loader',
exclude: [
Expand Down

0 comments on commit 215af2c

Please sign in to comment.