@@ -12,12 +12,12 @@ const external = (id: string) =>
12
12
! id . endsWith ( ".css" ) ;
13
13
14
14
// 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 ) ;
17
17
const cssContent = await readFile ( cssPath , "utf-8" ) ;
18
18
const legacyCssDirPath = resolve ( process . cwd ( ) , "packages" , packageName , "styles" ) ;
19
19
await mkdir ( legacyCssDirPath ) . catch ( ( ) => void 0 ) ;
20
- const cssDistPath = resolve ( legacyCssDirPath , "diff-view.css" ) ;
20
+ const cssDistPath = resolve ( legacyCssDirPath , file ) ;
21
21
await writeFile ( cssDistPath , cssContent ) ;
22
22
} ;
23
23
@@ -90,7 +90,8 @@ const start = async () => {
90
90
} ) ;
91
91
await buildCss ( "react" ) ;
92
92
await buildType ( "react" ) ;
93
- await copyCss ( "react" ) ;
93
+ await copyCss ( "react" , "diff-view.css" ) ;
94
+ await copyCss ( "react" , "diff-view-pure.css" ) ;
94
95
// 对于 "jsx": "preserve" 最新的rollup已经不支持解析,因此使用vite来进行打包
95
96
// https://github.com/rollup/plugins/issues/72
96
97
// https://rollupjs.org/migration/#configuration-changes
@@ -101,7 +102,8 @@ const start = async () => {
101
102
} ) ;
102
103
await buildCss ( "vue" ) ;
103
104
await buildType ( "vue" ) ;
104
- await copyCss ( "vue" ) ;
105
+ await copyCss ( "vue" , "diff-view.css" ) ;
106
+ await copyCss ( "vue" , "diff-view-pure.css" ) ;
105
107
process . exit ( 0 ) ;
106
108
} ;
107
109
0 commit comments