Skip to content

Commit b149498

Browse files
committed
fix(ui): build failing when executing task "build:css"
1 parent b245c0d commit b149498

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/ui/scripts/generateCSS.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import sass from 'sass';
22
import autoprefixer from 'autoprefixer';
33
import postcss from 'postcss';
44
import fs from 'fs-extra';
5+
import path from 'path';
56
import { globSync } from 'glob';
67
import { createTheme } from '../src/theme';
78

@@ -29,8 +30,11 @@ function writeCSS(props: {
2930
.process(result.css, { from: undefined })
3031
.then((result) => {
3132
result.warnings().forEach((warn) => {
33+
// eslint-disable-next-line no-console
3234
console.warn(warn.toString());
3335
});
36+
const dir = path.dirname(`dist/${outputPath}.css`);
37+
fs.ensureDirSync(dir);
3438
fs.writeFileSync(`dist/${outputPath}.css`, result.css);
3539
fs.writeFileSync(
3640
`dist/${outputPath}.layer.css`,

0 commit comments

Comments
 (0)