Skip to content

Commit

Permalink
build and copy if built css doesn't exist (#37632)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvchari committed Feb 11, 2022
1 parent 5150ad6 commit 9cfcb2d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build-system/tasks/extension-helpers.js
Expand Up @@ -512,12 +512,11 @@ async function buildNpmBentoWebComponentCss(extDir, options) {
const srcFilepath = path.resolve(
`build/css/${getBentoName(options.name)}-${options.version}.css`
);
if (await fs.pathExists(srcFilepath)) {
const destFilepath = path.resolve(`${extDir}/dist/web-component.css`);
await fs.copyFile(srcFilepath, destFilepath);
} else {
if (!(await fs.pathExists(srcFilepath))) {
await buildExtensionCss(extDir, options.name, options.version, options);
}
const destFilepath = path.resolve(`${extDir}/dist/web-component.css`);
await fs.copyFile(srcFilepath, destFilepath);
}

/** @type {TransformCache<string>} */
Expand Down

0 comments on commit 9cfcb2d

Please sign in to comment.