Skip to content

Commit

Permalink
simplify svelte plugin (#1221)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Oct 5, 2020
1 parent 0388e51 commit f515365
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions plugins/plugin-svelte/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ module.exports = function plugin(snowpackConfig, pluginOptions = {}) {
})
).code;
}
// COMPILE
const ssrOptions = {};
if (isSSR) {
ssrOptions.generate = 'ssr';
ssrOptions.hydratable = true;
ssrOptions.css = true;
}

const {js, css} = svelte.compile(codeToCompile, {
...svelteOptions,
...ssrOptions,
generate: isSSR ? 'ssr' : 'dom',
outputFilename: filePath,
filename: filePath,
});
Expand Down

0 comments on commit f515365

Please sign in to comment.