Skip to content

[TODO]: Add .js npm module test #399

@Tobbe

Description

@Tobbe

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:

  1. Find a library that supports prerendering (they might call it SSG or SSR). Maybe chart.js does, maybe not, I haven't checked
  2. Add it to a page that's marked for prerendering in Routes.tsx in our test-project (__fixtures__/test-project)
  3. Update the test-project generation script in tasks/
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions