Skip to content

Commit

Permalink
chore: fix patch css
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Oct 9, 2024
1 parent e266b78 commit 63e0419
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,8 @@ const patchCssFiles: Plugin = {
name: 'patch-css',
apply: 'build',
writeBundle() {
// 1. MonacoEditor.css -> monaco-editor.css
// inject css imports to the files
const outDir = path.resolve('dist')
fs.renameSync(
path.resolve(outDir, 'MonacoEditor.css'),
path.resolve(outDir, 'monaco-editor.css'),
)

// 2. inject css imports to the files
;['vue-repl', 'monaco-editor', 'codemirror-editor'].forEach((file) => {
const filePath = path.resolve(outDir, file + '.js')
const content = fs.readFileSync(filePath, 'utf-8')
Expand Down

0 comments on commit 63e0419

Please sign in to comment.