Skip to content

Commit

Permalink
chore(vite): use esbuild instead of babel (#10147)
Browse files Browse the repository at this point in the history
Tried building with esbuild in
#10119 but ran into an error
with CI. Keen on trying to fix that here. Looks like it was just a
matter of updating the default entry points so far.
  • Loading branch information
jtoar committed Mar 8, 2024
1 parent 8a9e133 commit 2c2abef
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/framework-tools/src/buildDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const defaultBuildOptions: ESBuildOptions = {
metafile: true,
}

export const defaultPatterns = ['./src/**/*.{ts,js}']
export const defaultPatterns = ['./src/**/*.{ts,js,tsx,jsx}']
export const defaultIgnorePatterns = [
'**/__tests__',
'**/*.test.{ts,js}',
Expand Down
1 change: 0 additions & 1 deletion packages/vite/.babelrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions packages/vite/build.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { build } from '@redwoodjs/framework-tools'

await build()
4 changes: 2 additions & 2 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
"cjsWrapper.js"
],
"scripts": {
"build": "yarn build:js && yarn build:types",
"build:js": "babel src -d dist --extensions \".js,.jsx,.ts,.tsx\"",
"build": "tsx build.mts && yarn build:types",
"build:pack": "yarn pack -o redwoodjs-vite.tgz",
"build:types": "tsc --build --verbose",
"test": "vitest run src",
Expand Down Expand Up @@ -97,6 +96,7 @@
"@types/yargs-parser": "21.0.3",
"glob": "10.3.10",
"rollup": "3.29.4",
"tsx": "4.6.2",
"typescript": "5.3.3",
"vitest": "1.2.2"
},
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8794,6 +8794,7 @@ __metadata:
react: "npm:0.0.0-experimental-e5205658f-20230913"
react-server-dom-webpack: "npm:0.0.0-experimental-e5205658f-20230913"
rollup: "npm:3.29.4"
tsx: "npm:4.6.2"
typescript: "npm:5.3.3"
vite: "npm:4.5.2"
vitest: "npm:1.2.2"
Expand Down

0 comments on commit 2c2abef

Please sign in to comment.