Skip to content

Commit

Permalink
chore(create-app): Use @preact/preset-vite for Preact templates (#2488)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored Mar 16, 2021
1 parent 73b80d5 commit c433236
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
6 changes: 3 additions & 3 deletions packages/create-app/template-preact-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"serve": "vite preview"
},
"dependencies": {
"preact": "^10.5.9"
"preact": "^10.5.13"
},
"devDependencies": {
"@prefresh/vite": "^2.0.0",
"@preact/preset-vite": "^2.0.0",
"typescript": "^4.1.3",
"vite": "^2.1.0"
}
}
}
9 changes: 2 additions & 7 deletions packages/create-app/template-preact-ts/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { defineConfig } from 'vite'
import preactRefresh from '@prefresh/vite'
import preact from '@preact/preset-vite'

// https://vitejs.dev/config/
export default defineConfig({
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment',
jsxInject: `import { h, Fragment } from 'preact'`
},
plugins: [preactRefresh()]
plugins: [preact()]
})
6 changes: 3 additions & 3 deletions packages/create-app/template-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"serve": "vite preview"
},
"dependencies": {
"preact": "^10.5.9"
"preact": "^10.5.13"
},
"devDependencies": {
"@prefresh/vite": "^2.0.0",
"@preact/preset-vite": "^2.0.0",
"vite": "^2.1.0"
}
}
}
9 changes: 2 additions & 7 deletions packages/create-app/template-preact/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { defineConfig } from 'vite'
import preactRefresh from '@prefresh/vite'
import preact from '@preact/preset-vite'

// https://vitejs.dev/config/
export default defineConfig({
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment',
jsxInject: `import { h, Fragment } from 'preact'`
},
plugins: [preactRefresh()]
plugins: [preact()]
})

0 comments on commit c433236

Please sign in to comment.