|
|
@ -253,41 +253,11 @@ export default class Component {
|
|
|
|
const { compile_options, name } = this;
|
|
|
|
const { compile_options, name } = this;
|
|
|
|
const { format = 'esm' } = compile_options;
|
|
|
|
const { format = 'esm' } = compile_options;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO reinstate banner (along with fragment marker comments)
|
|
|
|
const banner = `/* ${
|
|
|
|
const banner = `/* ${
|
|
|
|
this.file ? `${this.file} ` : ``
|
|
|
|
this.file ? `${this.file} ` : ``
|
|
|
|
}generated by Svelte v${'__VERSION__'} */`;
|
|
|
|
}generated by Svelte v${'__VERSION__'} */`;
|
|
|
|
|
|
|
|
|
|
|
|
// result = result
|
|
|
|
|
|
|
|
// .replace(/__svelte:self__/g, this.name)
|
|
|
|
|
|
|
|
// .replace(
|
|
|
|
|
|
|
|
// compile_options.generate === 'ssr'
|
|
|
|
|
|
|
|
// ? /(@+|#+)(\w*(?:-\w*)?)/g
|
|
|
|
|
|
|
|
// : /(@+)(\w*(?:-\w*)?)/g,
|
|
|
|
|
|
|
|
// (_match: string, sigil: string, name: string) => {
|
|
|
|
|
|
|
|
// if (sigil === '@') {
|
|
|
|
|
|
|
|
// if (name[0] === '_') {
|
|
|
|
|
|
|
|
// return this.global(name.slice(1));
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (!internal_exports.has(name)) {
|
|
|
|
|
|
|
|
// throw new Error(
|
|
|
|
|
|
|
|
// `compiler error: this shouldn't happen! generated code is trying to use inexistent internal '${name}'`
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (compile_options.dev) {
|
|
|
|
|
|
|
|
// if (internal_exports.has(`${name}_dev`)) name = `${name}_dev`;
|
|
|
|
|
|
|
|
// else if (internal_exports.has(`${name}Dev`))
|
|
|
|
|
|
|
|
// name = `${name}Dev`;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return this.helper(name);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return sigil.slice(1) + name;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const program: any = { type: 'Program', body: result };
|
|
|
|
const program: any = { type: 'Program', body: result };
|
|
|
|
|
|
|
|
|
|
|
|
walk(program, {
|
|
|
|
walk(program, {
|
|
|
|