Open psylum opened 9 months ago
Neglected to mention that the library being imported which is triggering the failure (by referencing it from a parallel folder after performing npm pack), can be found at https://github.com/psylum/acl-poc-lib. It is a simplified version of the problem, with the minimal desired capability (component library using react + astro uxds).
There's a branch in my reproduction repository that seems to fix the issue, where both the astro library and the components library are marked for transpilation. I didn't expect that both would need to be included, and i'm still not sure why that's needed at all, when an 'app router' app works without it.
Link to the code that reproduces this issue
https://github.com/psylum/acl-poc-page
To Reproduce
Specific commands related to package setup are included in the readme.
Perform a build or run the dev server.
Current vs. Expected behavior
Running a build fails, with the following output:
Expected this to work, as it does using an app router setup (see https://github.com/psylum/acl-poc-app). I've variously tried using
transpilePackages
, and before attempting against latest, had webpack output an esm or cjs module, though umd would be preferable.Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure, SWC transpilation
Additional context
This same behavior is seen in a pre-existing application using Next.js 13.2.3, i created these proof of concept apps using latest to reproduce the problem and verify it remained in the current release, so i could file this issue.