Arjan van Wieringen09/22/2023, 3:17 PM
project which I want to include in a React project. I have tried it 3 ways and only 1 works and I have no clue why. My feeling is that it is related to the INSANE JS module system. I would really appreciate some input. I have made a minimal reproduceable project for the 3 situations: 1. NPM + Create React App: This one works! Including source map support. However, CRA is deprecated and NPM is slow..... (https://github.com/avwie/kotlinx/tree/npm-webpack-cra). Just run
. 2. NPM + Vite Create React: This one results in
npm run dev
(https://github.com/avwie/kotlinx/tree/npm-vite). Also run
"useTodoViewModel" is not exported by "../build/js/packages/architecture-demo/kotlin/architecture-demo.js", imported by "src/main.tsx"
3. PNPM + Vite Create React: This one works, but source map support isn't working. They are not resolvable and cause 404. Having source-map support is critical for development. I think it is related with how PNPM works (a central store). (https://github.com/avwie/kotlinx/tree/pnpm-vite), and run
npm run dev
I hope there are people who know how I can get nr.3 to work?
pnpm run dev
Edoardo Luppi09/22/2023, 3:25 PM
directory. That's why I always copy the build output to a
directory, and then use the workspace feature of package managers.
should have never been invented.
Arjan van Wieringen09/22/2023, 3:31 PM