Skip to content

Commit

Permalink
run build after CSS modules updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed May 18, 2022
1 parent c01f9ff commit 0e9ee7d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/remix-dev/compiler.ts
Expand Up @@ -428,15 +428,11 @@ async function createBrowserBuild(
return undefined;
}
let builder = (async () => {
let { stylesheetUrl, stylesheetPath, ...rebuilt } =
let { stylesheetUrl, stylesheetPath, cssContent, moduleMap } =
await buildCssModules(config, build);
cssContent = rebuilt.cssContent;
moduleMap = rebuilt.moduleMap;

let result = await build.rebuild!();

await fse.ensureDir(path.dirname(stylesheetPath));
await fse.writeFile(stylesheetPath, cssContent);
let result = await build.rebuild!();

return {
...result,
Expand Down

0 comments on commit 0e9ee7d

Please sign in to comment.