Skip to content

Commit

Permalink
[ci] yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott authored and actions-user committed Dec 13, 2020
1 parent 004b874 commit 961dc77
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions snowpack/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,16 @@ class FileBuilder {
const srcExt = path.extname(url.fileURLToPath(this.fileURL));
// Workaround: HMR plugins need to add scripts to HTML file, even if static.
// TODO: Remove once no longer needed in dev.
const fileOutput = (this.mountEntry.static && srcExt !== '.html')
? {[srcExt]: {code: await readFile(this.fileURL)}}
: await buildFile(this.fileURL, {
plugins: this.config.plugins,
isDev: false,
isSSR,
isHmrEnabled: false,
sourceMaps: this.config.buildOptions.sourceMaps,
});
const fileOutput =
this.mountEntry.static && srcExt !== '.html'
? {[srcExt]: {code: await readFile(this.fileURL)}}
: await buildFile(this.fileURL, {
plugins: this.config.plugins,
isDev: false,
isSSR,
isHmrEnabled: false,
sourceMaps: this.config.buildOptions.sourceMaps,
});

for (const [fileExt, buildResult] of Object.entries(fileOutput)) {
let {code, map} = buildResult;
Expand Down

1 comment on commit 961dc77

@vercel
Copy link

@vercel vercel bot commented on 961dc77 Dec 13, 2020

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.