Skip to content

Commit

Permalink
Fix CSS bundle scripts on Windows (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding authored Nov 17, 2023
1 parent b083861 commit c787acf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions packages/core/scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ function createCssEntryFile(callback) {

cssFiles.forEach((cssFile, index) => {
writeLine(
`@import "${path.relative(path.dirname(entryFile), cssFile)}";`,
`@import "${path.posix.relative(
path.posix.dirname(entryFile),
cssFile
)}";`,
index
);
});
Expand Down Expand Up @@ -61,7 +64,8 @@ function runBuild() {
path.join(buildFolder, outfileName),
path.join(cssFolder, outfileName)
);

})
.finally(() => {
//delete generated entry file
deleteSync([entryFile], { force: true });
});
Expand Down
8 changes: 6 additions & 2 deletions packages/lab/scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ function createCssEntryFile(callback) {

cssFiles.forEach((cssFile, index) => {
writeLine(
`@import "${path.relative(path.dirname(entryFile), cssFile)}";`,
`@import "${path.posix.relative(
path.posix.dirname(entryFile),
cssFile
)}";`,
index
);
});
Expand Down Expand Up @@ -61,7 +64,8 @@ function runBuild() {
path.join(buildFolder, outfileName),
path.join(cssFolder, outfileName)
);

})
.finally(() => {
//delete generated entry file
deleteSync([entryFile], { force: true });
});
Expand Down

1 comment on commit c787acf

@vercel
Copy link

@vercel vercel bot commented on c787acf Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.