Skip to content

Commit c6ed795

Browse files
committed
Allow for shared and format options to be overridden
1 parent d670654 commit c6ed795

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

index.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ module.exports = function(source, map) {
2424
const callback = this.async();
2525

2626
options.filename = this.resourcePath;
27-
options.format = this.version === 1 ? options.format || 'cjs' : 'es';
28-
options.shared =
29-
options.format === 'es' && 'svelte/shared.js';
27+
if (!options.format) {
28+
options.format = this.version === 1 ? options.format || 'cjs' : 'es';
29+
}
30+
if (!options.shared) {
31+
options.shared = options.format === 'es' && 'svelte/shared.js';
32+
}
3033

3134
if (options.emitCss) options.css = false;
3235

0 commit comments

Comments
 (0)