-
Notifications
You must be signed in to change notification settings - Fork 13
didn't load non ts file #14
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
Comments
You'll need to be more specific than that, this is barely any more descriptive than just "doesn't work". |
Try use alias with fonts or images. |
k not sure this is a use case that can be supported, not even sure how it's supposed to work without a path alias. are you using some custom loader with webpack or sth? |
I use @rollup/plugin-url, it's great plugin. |
After upgrading Rollup from v2 to v3 and commonjs plugin, I'm having an issue with loading
A few things I observed:
This was the exact behavior with rollup v2 (the double path) but now it's actually failing, specifically with |
@elado, allowJS: true in your tsconfif file? |
Yes. with |
Ok cool I wasn't aware that Rollup has released a v3 yet (not actively working with Rollup anymore at the moment). https://rollupjs.org/migration/#changes-to-the-plugin-api looks like there were some plugin API changes so until I have a closer look I'm not sure it's currently compatible with v3. |
Sorry @elado just read your message properly... can you maybe try a patch in your project by opening outDir = _g.outDir to outDir = _g.compilerOptions.outDir (at least I think that's the fix you were suggesting?) 🙏 |
This doesn't change much - |
What I wonder is why you'd get an absolute path in the first place... usually import paths are always relative? |
Any update? It is also impossible to use
|
Just from having a quick look at this again, it seems like using rollup-plugin-typescript-paths/index.ts Lines 49 to 52 in a65dedd
is If anyone could try that I'm happy to fix it. I just don't have any test case to reproduce, a PR just creating a repro test case would also greatly help with it. |
Thanks for quick response.
|
Ok cool, thanks for testing that! Just to confirm, you just switched out |
Exactly. const targetFileName = path.relative(
outDir,
preserveExtensions ? resolvedFileName : resolvedFileName.replace(/\.tsx?$/i, '.js'),
); |
I use alias for assets, it doesn't work.
The text was updated successfully, but these errors were encountered: