Closed kalocide closed 7 months ago
Thank you for this report!
You should be able to import from node_modules like this...
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="../node_modules/@radix-ui/themes/styles.css">
<script src="index.tsx" defer></script>
</head>
<body></body>
</html>
Would you like it if it parsed a node module uniquely so that you did not have to include the ../node_modules
part? If so, where would you like the file to be placed within the build dir?
Doing this works, however it places the outputs into two directories src
and node_modules
within the build outputs. That may be acceptable but not for all use cases. I think ideally it would be configurable, and maybe hash asset naming could solve the issue of where to place outputs. But either way, I'm closing this as I ended up using esbuild, and I don't believe it's a killer issue.
Importing a module from NPM, throws an error. Minimum reproducible example:
which throws:
I would expect this to work, but it seems that it doesn't.