Skip to content

Commit

Permalink
TypeScript setup
Browse files Browse the repository at this point in the history
  • Loading branch information
slashman committed Feb 23, 2023
1 parent 9ebac1c commit bcc4bb5
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 2 deletions.
266 changes: 266 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"electron-reload": "^1.5.0",
"html-webpack-plugin": "^5.5.0",
"minimist": "^1.2.7",
"source-map-loader": "^4.0.1",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.2",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.11.1",
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"outDir": "./built",
"allowJs": true,
"target": "es5"
},
"include": ["./src/**/*"]
}
8 changes: 6 additions & 2 deletions webpack/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ let options = {
module: {
rules: [
{
test: /\.js(x)?$/,
test: /\.ts?$/,
use: "ts-loader"
},
{
test: /\.js?$/,
exclude: /node_modules/,
use: ['babel-loader']
},
Expand All @@ -31,7 +35,7 @@ let options = {
},

resolve: {
extensions: ['', '.js', '.jsx'],
extensions: ['', '.js', '.ts'],
},

entry: {
Expand Down

0 comments on commit bcc4bb5

Please sign in to comment.