File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ import { defineConfig } from "vite";
5
5
import pkg from "./package.json" ;
6
6
// import eslintPlugin from "vite-plugin-eslint";
7
7
8
- const deps = Object . keys ( pkg . dependencies ) ;
9
-
10
8
// https://vitejs.dev/config/
11
9
export default defineConfig ( ( conf ) => ( {
12
10
test : {
@@ -39,16 +37,15 @@ export default defineConfig((conf) => ({
39
37
rollupOptions : {
40
38
// make sure to externalize deps that shouldn't be bundled
41
39
// into your library
42
- external : ( source : string ) => {
43
- if ( deps . includes ( source ) ) {
44
- return true ;
45
- }
46
- return (
47
- source . startsWith ( "prosemirror-" ) ||
48
- source . startsWith ( "@shikijs/lang" ) ||
49
- source . startsWith ( "@shikijs/theme" )
50
- ) ;
51
- } ,
40
+ external : [
41
+ ...Object . keys ( {
42
+ ...pkg . dependencies ,
43
+ ...pkg . peerDependencies ,
44
+ ...pkg . devDependencies ,
45
+ } ) ,
46
+ "react-dom/client" ,
47
+ "react/jsx-runtime" ,
48
+ ] ,
52
49
output : {
53
50
// Provide global variables to use in the UMD build
54
51
// for externalized deps
You can’t perform that action at this time.
0 commit comments