Skip to content

Commit

Permalink
Use sucrase to compile typescript in light speed
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelpicosean committed Apr 27, 2021
1 parent 79d485a commit ff9b682
Show file tree
Hide file tree
Showing 3 changed files with 3,995 additions and 7 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"product": "npm run build && npm run compress"
},
"devDependencies": {
"@sucrase/webpack-loader": "^2.0.0",
"base64-inline-loader": "^1.1.1",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^7.0.0",
Expand All @@ -21,11 +22,9 @@
"pako": "^2.0.2",
"precompress": "^6.3.2",
"raw-loader": "^4.0.0",
"react-dev-utils": "^11.0.1",
"sucrase": "^3.18.1",
"terser-webpack-plugin": "^5.0.3",
"ts-loader": "^8.0.12",
"tsconfig-paths-webpack-plugin": "^3.3.0",
"typescript": "^4.1.3",
"walk": "^2.3.9",
"webpack": "^5.10.1",
"webpack-cli": "^4.2.0",
Expand Down
9 changes: 5 additions & 4 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ module.exports = {
rules: [
{
test: /\.ts$/,
loader: "ts-loader",
options: {
transpileOnly: true,
experimentalWatchApi: true,
use: {
loader: "@sucrase/webpack-loader",
options: {
transforms: ["typescript"],
},
},
},
// Shaders
Expand Down
Loading

0 comments on commit ff9b682

Please sign in to comment.