-
Notifications
You must be signed in to change notification settings - Fork 1.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
Include file from outside of the project root #634
Comments
There are enough details here that I'm not sure exactly what's going on. For example, some of the files in https://github.com/henriquehbr/svelte-typewriter use paths that start with |
Of course, this branch contains the whole project structure for reproducing the bug in question Just for clarification, both build scripts are called I thought about cloning the Many thanks for your time and support!
|
Thanks. I can reproduce the issue. It looks like esbuild is expecting all entry points to be inside the When esbuild generates the output path for a bundled entry point, it computes the relative path from What are you expecting the output directory to look like in this case? The generated output paths look something like this (if
I can't just remove the leading |
According to the docs:
Full context: I'm refactoring
svelte-typewriter
codebase, it's essentially composed by the library source code on the root directory, and aexample
subdirectory with a demo Svelte project for testing purposes with the following directory structure:I'm building the Svelte component with the following config:
When i try to import
./src/Typewriter.svelte
from./example/src/components/TypewriterControls.svelte
, esbuild end up including unnecessary files/folders from root directory (likeexample
, andsrc
), is there any viable way to import a file from outside of the project folder, and build it withoutdir
without replicating the whole directory structure of the imported file parent directory?Edit: i even tried including
outbase
in the config as pointed in the docs, but with no luck, i received the following error:I'm not 100% sure of what could be happening here, but i suspect that it might have something to do with the
*.js
files imported by the Svelte component not being able to properly import their modulesThe text was updated successfully, but these errors were encountered: