Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/plain-kiwis-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/preact': patch
---

fix: add ability to pass Babel props
11 changes: 9 additions & 2 deletions packages/integrations/preact/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,18 @@ function optionsPlugin(include: Options['include'], exclude: Options['exclude'])
};
}

export interface Options extends Pick<VitePreactPluginOptions, 'include' | 'exclude'> {
export interface Options extends Pick<VitePreactPluginOptions, 'include' | 'exclude' | 'babel'> {
compat?: boolean;
devtools?: boolean;
}

export default function ({ include, exclude, compat, devtools }: Options = {}): AstroIntegration {
export default function ({
include,
exclude,
compat,
devtools,
babel,
}: Options = {}): AstroIntegration {
return {
name: '@astrojs/preact',
hooks: {
Expand All @@ -62,6 +68,7 @@ export default function ({ include, exclude, compat, devtools }: Options = {}):
include,
exclude,
babel: {
...babel,
cwd: fileURLToPath(babelCwd),
},
});
Expand Down
Loading