We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've created a simple transformer package (linked locally):
const { Transformer } = require("@parcel/plugin") module.exports = new Transformer({ async transform({ asset }) { return [asset] }, })
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.
rf -rf .parcel-cache
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?
{ "extends": [ "@parcel/config-default" ], "transformers": { "*.ts": [ "parcel-transformer-ts", "..." ] } }
Should work without error.
The resolve error.
As a workaround, if not to include files with such URLs in transformed, it works.
I've create repro example: https://github.com/wclr/parcel-transform-issue
The text was updated successfully, but these errors were encountered:
Also with this transformer in config parcel build doesn't work.
Sorry, something went wrong.
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).
new URL('...', import.meta.url)
require(...)
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).
"*.ts"
"*.{js,ts,tsx}"
.ts
.tsx
.js
Maybe it's related to assets changing type from .ts[x] to .js during transformation? Just guessing here...
.ts[x]
This is likely the same bug as described in #4936 (comment)
Thanks @mischnic! It sounds right.
No branches or pull requests
🐛 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
The text was updated successfully, but these errors were encountered: