Skip to content

Commit

Permalink
chore: Use @preact/preset-vite for Preact templates
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Mar 15, 2021
1 parent bcd458b commit 4582332
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/create-app/template-preact-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"preact": "^10.5.9"
},
"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()]
})
4 changes: 2 additions & 2 deletions packages/create-app/template-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preact": "^10.5.9"
},
"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 4582332

Please sign in to comment.