diff --git a/.gitignore b/.gitignore index bd20c2c1ae..6360336df3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ node_modules /store.umd.js /yarn-error.log _actual*.* -_ \ No newline at end of file +_* \ No newline at end of file diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 0f3602fa13..b772d74c6f 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -124,8 +124,13 @@ export default class Component { throw new Error(`No tag name specified`); // TODO better error } + this.fragment = new Fragment(this, ast.html); + if (!this.customElement) this.stylesheet.reify(); + + this.stylesheet.warnOnUnusedSelectors(options.onwarn); + if (!this.ast.js) { - this.declarations = Array.from(this.expectedProperties); + this.declarations.push(...this.expectedProperties); addToSet(this.writable_declarations, this.expectedProperties); this.exports = this.declarations.map(name => ({ @@ -133,12 +138,6 @@ export default class Component { as: name })); } - - this.fragment = new Fragment(this, ast.html); - // this.walkTemplate(); - if (!this.customElement) this.stylesheet.reify(); - - this.stylesheet.warnOnUnusedSelectors(options.onwarn); } addSourcemapLocations(node: Node) {