Closed vafu closed 3 hours ago
node_modules is not bundled when running the app.
node_modules
tsconfig.json
{ "compilerOptions": { "baseUrl": ".", "experimentalDecorators": true, "jsx": "react-jsx", "jsxImportSource": "/usr/share/astal/gjs/gtk4", "module": "ES2022", "moduleResolution": "Bundler", "paths": { "astal": [ "/usr/share/astal/gjs" ], "astal/*": [ "/usr/share/astal/gjs/*" ] }, "target": "ES2022", "typeRoots": [ "./node_modules/@types" ] } }
package.json
{ "dependencies": { "@types/rx": "^4.1.4" } }
results in
✘ [ERROR] Could not resolve "rx" app.ts:5:27: 5 │ import { Observable } from "rx" ╵ ~~~~ You can mark the path "rx" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
I'm being an idiot by installing just types, it all works no problem if I actually install the library :)
node_modules
is not bundled when running the app.tsconfig.json
package.json
results in