Skip to content

Commit

Permalink
always use es format and shared helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Mar 19, 2017
1 parent a24cc27 commit e9f8600
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ const { getOptions } = require('loader-utils');
module.exports = function(source, map) {
this.cacheable();

const filename = this.resourcePath;
const filename = this.filename;
const options = getOptions(this) || {};

try {
let { code, map } = compile(source, {
filename: filename,
generate: options.generate,
format: options.format || 'es',
shared: options.shared || false,
format: 'es',
shared: require.resolve('svelte/shared.js'),
name: options.name,
css: options.css !== false,
});
Expand Down

0 comments on commit e9f8600

Please sign in to comment.