Skip to content

Commit

Permalink
fixes errors in the multi-file building example (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott-Fischer authored Dec 5, 2020
1 parent b16264d commit be3ba0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/_template/guides/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ module.exports = function(snowpackConfig, pluginOptions) {
resolve: {
input: ['.svelte'],
output: ['.js', '.css'],
}
},
async load({ filePath }) {
const fileContents = await fs.readFile(filePath, 'utf-8');
const { js, css } = svelte.compile(codeToCompile, { filename: filePath });
const { js, css } = svelte.compile(fileContents, { filename: filePath });
return {
'.js': js && js.code,
'.css': css && css.code,
Expand Down

1 comment on commit be3ba0a

@vercel
Copy link

@vercel vercel bot commented on be3ba0a Dec 5, 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.