shift the registry code down close to the require call

pull/4251/head
tanhauhau 4 years ago
parent 130aab9621
commit 19eb2cc8b1

@ -64,13 +64,6 @@ describe('runtime', () => {
immutable: config.immutable,
accessors: 'accessors' in config ? config.accessors : true
};
register.clearCompileOutputCache();
register.clearRequireCache();
register.setCompile((config.preserveIdentifiers ? svelte : svelte$).compile);
register.setCompileOptions(compileOptions);
register.setOutputFolderName(hydrate ? 'hydratable' : 'normal');
let mod;
let SvelteComponent;
@ -100,6 +93,12 @@ describe('runtime', () => {
};
});
register.clearCompileOutputCache();
register.clearRequireCache();
register.setCompile((config.preserveIdentifiers ? svelte : svelte$).compile);
register.setCompileOptions(compileOptions);
register.setOutputFolderName(hydrate ? 'hydratable' : 'normal');
mod = require(`./samples/${dir}/main.svelte`);
SvelteComponent = mod.default;

Loading…
Cancel
Save