Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WXS used in template will lose when referenced by other file #47

Closed
SgLy opened this issue May 31, 2023 · 0 comments
Closed

WXS used in template will lose when referenced by other file #47

SgLy opened this issue May 31, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@SgLy
Copy link
Contributor

SgLy commented May 31, 2023

test case to reproduce:

const def = glassEasel
  .registerElement({
    template: multiTmpl({
      child: `
        <wxs name="w">module.exports = { fn: function () { return 1 } }</wxs>
        <template name="child">
          <span>{{ w.fn() }}</span>
        </template>
      `,
      '': `
        <import src="./child" />
        <div>
          <template is="child" />
        </div>
      `,
    }),
  })
  .general()
const elem = glassEasel.Component.create('root', def)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants