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

Add support for Solid JSX #7

Open
trusktr opened this issue May 12, 2020 · 1 comment
Open

Add support for Solid JSX #7

trusktr opened this issue May 12, 2020 · 1 comment
Labels
wip work in progress

Comments

@trusktr
Copy link
Member

trusktr commented May 12, 2020

The tests and global build for a package with .tsx outputting to .jsx currently don't work because lume/cli's Webpack setup isn't configured to consume .jsx yet.

@trusktr trusktr added the wip work in progress label Dec 2, 2020
@trusktr
Copy link
Member Author

trusktr commented Dec 2, 2020

Karma-webpack is now configured to consume .jsx files, but the top-level files that run through karma (i.e. *.test.js files) can not have .jsx extensions, otherwise Karma will fail to pass those files to karma-webpack for handling. We've gotten rid of Karma, replaced it with @web/test-runner. It consumes plain .js files, and we transpile .tsx to .js.

  • make lume build output everything as .js with JSX compiled away (we need to do this in order to be ES Module compliant anyway, more details in make build output, including JSX compilation, compatible with Node.js ES Module format. lume#219)
    • We had implemented this at one point, but the recent cli updates are outputting .jsx files again. We'll need to use both TypeScript and a secondary Babel step.
  • @lume/element does not depend on itself, so when we run tests in the lume/element repo, the JSX build output's @lume/element import specifiers need to be replaced with something else or else lume/element tests don't know how to import the library they're in. This is a bit meta. For the lume/element case, maybe the webpack config for karma-webpack can have a resolve.alias setting to make @lume/element alias to dist/index.js No longer relevant, tests work great in @web/test-runner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip work in progress
Projects
None yet
Development

No branches or pull requests

1 participant