-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External imports can't build #3306
Comments
there's no longer a second bundling step with |
@benmccann oh, missed it, thanks. But behaviour (error) the same. |
You should be able to do |
Closing due to inactivity and lack of reproduction. |
Still not work, add
but still report Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/plugins/siyuan-plugin-publisher-pro/app/libs/publisher-service/publisher_service.js' imported from /Users/terwer/Documents/mydocs/siyuan-plugins/siyuan-plugin-publisher-pro-src/apps/publisher-app/.svelte-kit/output/server/entries/pages/_layout.ts.js |
Fixed, I disable ssr import by the following code const initWasm = async () => {
if (!isBrowser) {
return
}
} |
Describe the bug
I want to put in the root dir of SvelteKit my config file: app.config.js (near svelte.config.js, package.json, etc)
So I create alias $base, mark file as external and use it anywhere in app via import (import appConfig from "$base/app.config"):
Everything works in DEV but when I want build via adapter-node I've got an error:
I spent much time to find solution and only possible is made path absolute during rollup build. For it helps option makeAbsoluteExternalsRelative: 'ifRelativeSource' (by default it's true in rollup and looks like error with it — rollup writes incorrect relative path)
So, with this option my config file imports from absolute path and works as expected. But I need solution to move my app in another place without hard coded imports.
Reproduction
Use code sample above
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: