-
Notifications
You must be signed in to change notification settings - Fork 599
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
fix: rollup bundles don't resolve fast-element utilities #6070
Comments
I think it technically builds the bundle correctly..but yeah there's some sort of issue with Rollup not handling this right. It might be worth us contributing to rollup to fix this so that customers don't get confused/frustrated. I'm not sure if they've got an issue open or not yet. |
Oh, I see you linked the issues above 😝 |
It's probably related to this so I'd leave the comment here instead of creating a new issue. While testing the FAST Foundation components > fast-alpha-angular@0.0.0 start
> ng serve
✔ Browser application bundle generation complete.
Initial Chunk Files | Names | Raw Size
vendor.js | vendor | 1.92 MB |
polyfills.js | polyfills | 318.03 kB |
styles.css, styles.js | styles | 210.10 kB |
main.js | main | 47.96 kB |
runtime.js | runtime | 6.53 kB |
| Initial Total | 2.49 MB
Build at: 2022-10-07T03:07:02.956Z - Hash: fa73df67e6f62584 - Time: 4465ms
Error: node_modules/@microsoft/fast-foundation/dist/dts/index.d.ts:50:50 - error TS2307: Cannot find module '@microsoft/fast-element/utilities' or its corresponding type declarations.
50 export { composedParent, composedContains } from "@microsoft/fast-element/utilities";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
✖ Failed to compile. Here is a sample Angular project to show the error: I do see there is a TODO to remove it and when I do so, it works as expected. Wondering when we can remove? |
I forgot about this one. @janechu Do you know if we still need this for the CLI? |
This is not needed by the CLI. |
🐛 Bug Report
It seems that Rollup doesn't support the use of the
exports
field in package.json.Probably related:
nodenext
/node12
rollup/plugins#1058🤔 Expected Behavior
Rollup should be able to resolve and handle imports from
@microsoft/fast-element/utilities
.😯 Current Behavior
An error is present when running
build:rollup
in@microsoft/fast-foundation
(other packages which use Rollup may also be affected):💁 Possible Solution
We could divert the Rollup builds to use the already-built
dist
files (generated bybuild:tsc
before rollup runs) until Rollup receives properexports
support.The text was updated successfully, but these errors were encountered: