In some places of the source code I test for .js imports, assuming they're imports for files local to the app. But there are valid npm packages, e.g. chart.js, that have .js in their name.
Also https://www.npmjs.com/package/pixi.js
I wonder if there are also packages that end with .ts
Make sure to cover a library like that in both dev, serve and prerender tests
Steps:
- Find a library that supports prerendering (they might call it SSG or SSR). Maybe chart.js does, maybe not, I haven't checked
- Add it to a page that's marked for prerendering in
Routes.tsx in our test-project (__fixtures__/test-project)
- Update the test-project generation script in
tasks/
- Add validation to CI smoke tests that the component has been rendered (dev and serve both use the same test function). A simple string lookup is sufficient for prerender tests
Semi-related TS issue: microsoft/TypeScript#59597
Also this PR microsoft/TypeScript#59767
In some places of the source code I test for
.jsimports, assuming they're imports for files local to the app. But there are valid npm packages, e.g. chart.js, that have.jsin their name.Also https://www.npmjs.com/package/pixi.js
I wonder if there are also packages that end with
.tsMake sure to cover a library like that in both
dev,serveandprerendertestsSteps:
Routes.tsxin our test-project (__fixtures__/test-project)tasks/Semi-related TS issue: microsoft/TypeScript#59597
Also this PR microsoft/TypeScript#59767