Unable to make serverDependenciesToBundle work #3502
-
In my monorepo, I have a ESM component library that I am trying to consume in my remix app. However I am getting the following errors when trying to run `npm run dev": I tried to include the ESM library in the /**
* @type {import('@remix-run/dev').AppConfig}
*/
module.exports = {
ignoredRouteFiles: ['**/.*'],
appDirectory: 'src',
serverDependenciesToBundle: ['@movie-magic/ui-lib'],
// assetsBuildDirectory: "public/build",
// serverBuildPath: "build/index.js",
// publicPath: "/build/",
}; The same library is easily consumed by a React app built using Vite. So I know that this should be possible. Can someone please help me understand what the issue may be? My repo is here: https://github.com/code-shaper/movie-magic/tree/remix-esm-issue (note that this work is on the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I finally gave up on the above approach. Now bundling the component library using |
Beta Was this translation helpful? Give feedback.
I finally gave up on the above approach. Now bundling the component library using
tsup
and consuming it in the remix app. See new implementation here: https://github.com/code-shaper/movie-magic. tsup is used inpackages/ui-lib
.