Skip to content

Commit 9b8b386

Browse files
committed
Remove charset instruction from main css
1 parent dd6052e commit 9b8b386

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

scripts/build/build.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ import yargsParser from "yargs-parser";
3131
"recursive": true
3232
});
3333

34+
{
35+
const filePath = pathJoin(dsfrDirPath, "dsfr.css");
36+
37+
const dsfrCssContent = fs.readFileSync(filePath).toString("utf8");
38+
39+
const dsfrCssContent_patched = dsfrCssContent.replace('@charset "UTF-8";', "");
40+
41+
fs.writeFileSync(filePath, Buffer.from(dsfrCssContent_patched, "utf8"));
42+
}
43+
3444
fs.cpSync(
3545
pathJoin(__dirname, "marianne-index.css"),
3646
pathJoin(dsfrDirPath, "fonts", "index.css")

scripts/build/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
@charset "UTF-8";
12
@import url(./dsfr/dsfr.css);
23
@import url(./dsfr/utility/icons/icons.min.css)

0 commit comments

Comments
 (0)