Replies: 1 comment 1 reply
-
Is your library public anywhere? Pretty hard for people to diagnose issues without being able to see the source. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Vanilla TypeScript library that uses Vite similar to the starter library project. I'm trying to install it into an Angular application that uses
@angular-devkit/build-angular:browser
, which builds with Webpack, I get amodule not found
error for anything exported from my TS library. If I try any other Webpack applications, I get a similar result.For example, if I try installing that starter library project into a Webpack boilerplate and importing
sum()
, I get the following error:I take it that the module is not being found because Webpack does not support the ESM format that Vite is building. Where I get lost is how to configure my vite.config.ts and tsconfig.json to support Webpack — if that is at all possible. If I try switching my output to
cjs
, it doesn't seem to make much of a difference. Are there any guides/examples of how to make Vite libraries work with Webpack?And before you ask: yes I'm stuck with supporting said Angular projects set to
@angular-devkit/build-angular:browser
.Beta Was this translation helpful? Give feedback.
All reactions