Open trusktr opened 4 years ago
Karma-webpack is now configured to consume We've gotten rid of Karma, replaced it with .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.@web/test-runner
. It consumes plain .js
files, and we transpile .tsx
to .js
.
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 https://github.com/lume/lume/issues/219)
.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
@web/test-runner
.
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.