@@ -12,12 +12,12 @@ const external = (id: string) =>
1212 ! id . endsWith ( ".css" ) ;
1313
1414// fix css path not found in legacy module bundler
15- const copyCss = async ( packageName : string ) => {
16- const cssPath = resolve ( process . cwd ( ) , "packages" , packageName , "dist" , "css" , "diff-view.css" ) ;
15+ const copyCss = async ( packageName : string , file : string ) => {
16+ const cssPath = resolve ( process . cwd ( ) , "packages" , packageName , "dist" , "css" , file ) ;
1717 const cssContent = await readFile ( cssPath , "utf-8" ) ;
1818 const legacyCssDirPath = resolve ( process . cwd ( ) , "packages" , packageName , "styles" ) ;
1919 await mkdir ( legacyCssDirPath ) . catch ( ( ) => void 0 ) ;
20- const cssDistPath = resolve ( legacyCssDirPath , "diff-view.css" ) ;
20+ const cssDistPath = resolve ( legacyCssDirPath , file ) ;
2121 await writeFile ( cssDistPath , cssContent ) ;
2222} ;
2323
@@ -90,7 +90,8 @@ const start = async () => {
9090 } ) ;
9191 await buildCss ( "react" ) ;
9292 await buildType ( "react" ) ;
93- await copyCss ( "react" ) ;
93+ await copyCss ( "react" , "diff-view.css" ) ;
94+ await copyCss ( "react" , "diff-view-pure.css" ) ;
9495 // 对于 "jsx": "preserve" 最新的rollup已经不支持解析,因此使用vite来进行打包
9596 // https://github.com/rollup/plugins/issues/72
9697 // https://rollupjs.org/migration/#configuration-changes
@@ -101,7 +102,8 @@ const start = async () => {
101102 } ) ;
102103 await buildCss ( "vue" ) ;
103104 await buildType ( "vue" ) ;
104- await copyCss ( "vue" ) ;
105+ await copyCss ( "vue" , "diff-view.css" ) ;
106+ await copyCss ( "vue" , "diff-view-pure.css" ) ;
105107 process . exit ( 0 ) ;
106108} ;
107109
0 commit comments