File tree Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -41,25 +41,22 @@ export default defineConfig((conf) => ({
4141 rollupOptions : {
4242 // make sure to externalize deps that shouldn't be bundled
4343 // into your library
44- external : ( source : string ) => {
45- if ( deps . includes ( source ) ) {
46- return true ;
47- }
48-
49- if ( source === "react/jsx-runtime" ) {
50- return true ;
51- }
52-
53- if ( source . startsWith ( "prosemirror-" ) ) {
54- return true ;
55- }
56-
57- return false ;
58- } ,
44+ external : [
45+ ...Object . keys ( {
46+ ...pkg . dependencies ,
47+ ...pkg . peerDependencies ,
48+ ...pkg . devDependencies ,
49+ } ) ,
50+ "react-dom/client" ,
51+ "react/jsx-runtime" ,
52+ ] ,
5953 output : {
6054 // Provide global variables to use in the UMD build
6155 // for externalized deps
62- globals : { } ,
56+ globals : {
57+ react : "React" ,
58+ "react-dom" : "ReactDOM" ,
59+ } ,
6360 interop : "compat" , // https://rollupjs.org/migration/#changed-defaults
6461 } ,
6562 } ,
You can’t perform that action at this time.
0 commit comments