diff --git a/index.js b/index.js index 9bbb46b..1607b0d 100644 --- a/index.js +++ b/index.js @@ -32,6 +32,7 @@ const pluginOptions = { extensions: true, emitCss: true, preprocess: true, + strictOrder: true, // legacy — we might want to remove/change these in a future version onwarn: true, @@ -215,11 +216,15 @@ module.exports = function svelte(options = {}) { } preprocessPromise = preprocess( code, - Object.assign(preprocessOptions, { filename: id }) + Object.assign(preprocessOptions, { + filename: id, + strictOrder: options.strictOrder + }) ).then(code => code.toString()); } else { preprocessPromise = preprocess(code, options.preprocess, { - filename: id + filename: id, + strictOrder: options.strictOrder }).then(processed => { if (processed.dependencies) { dependencies.push(...processed.dependencies);