Open wclr opened 2 years ago
Also with this transformer in config parcel build doesn't work.
I've create repro example: https://github.com/wclr/parcel-transform-issue
FWIW I'm getting the same issue with v2.12.0.
It happens both with new URL('...', import.meta.url)
and with inline require(...)
calls (inside ESM modules).
Add the problem goes away if I replace the "*.ts"
selector with "*.{js,ts,tsx}"
(my project contains both .ts
and .tsx
, but no .js
).
Maybe it's related to assets changing type from .ts[x]
to .js
during transformation? Just guessing here...
This is likely the same bug as described in https://github.com/parcel-bundler/parcel/issues/4936#issuecomment-1561990190
Thanks @mischnic! It sounds right.
🐛 bug report
I've created a simple transformer package (linked locally):
Even if it does nothing (just returns asset) I get the error (there in the file I'm creating svg URL from local asset):
@parcel/core: Failed to resolve 'bfa690e8b0a64f58' from './src/ui.ts'
Error looks this way
If to remove "parcel-transformer-ts" from ts transformers lits, it works, though I aslo need to
rf -rf .parcel-cache
otherwise the error persists.More strangely it is a kind of floating bug because sometimes it started work while I was updating the transformer file when the bundler was running.
So any advice on this, maybe something wrong with the config?
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
Should work without error.
😯 Current Behavior
The resolve error.
💁 Possible Solution
As a workaround, if not to include files with such URLs in transformed, it works.
Repro example
I've create repro example: https://github.com/wclr/parcel-transform-issue
🔦 Context
💻 Code Sample
🌍 Your Environment