Skip to content

Commit

Permalink
🔧 Add onlyRemoveTypeImports on the TS preset
Browse files Browse the repository at this point in the history
  • Loading branch information
amoutonbrady committed Aug 27, 2021
1 parent 6c18a33 commit 7c9ad7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
};

if (id.includes('tsx')) {
opts.presets.push(ts);
// The `onlyRemoveTypeImports` prevent directives from failing
opts.presets.push([ts, { onlyRemoveTypeImports: true }]);
}

// Default value for babel user options
Expand Down

0 comments on commit 7c9ad7e

Please sign in to comment.