Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
externalize prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
hanspagel committed Dec 12, 2023
1 parent 923e5dc commit d8d7de4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/snippetz/src/format.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import babel from 'prettier/plugins/babel'
import estree from 'prettier/plugins/estree'
import * as prettier from 'prettier/standalone'
import * as prettier from 'prettier'

export async function format(source: any) {
const target = source.target
Expand Down
14 changes: 14 additions & 0 deletions packages/snippetz/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ export default defineConfig({
name: meta.name,
fileName: 'index',
},
rollupOptions: {
external: [
'prettier',
'prettier/plugins/babel',
'prettier/plugins/estree',
],
output: {
globals: {
prettier: 'prettier',
'prettier/plugins/babel': 'babel',
'prettier/plugins/estree': 'estree',
},
},
},
},
resolve: {
alias: [
Expand Down

0 comments on commit d8d7de4

Please sign in to comment.