parcel: Parcel 2: @parcel/transformer-raw problems
๐ bug report
https://github.com/Banou26/parcel-bug-4174
When using this configuration as per https://github.com/parcel-bundler/parcel/issues/1080#issuecomment-557240449 and https://github.com/parcel-bundler/parcel/issues/501#issuecomment-557240714
.parcelrc
{
"extends": "@parcel/config-default",
"transforms": {
"url:*": ["@parcel/transformer-raw"]
}
}
The end build isnโt transpiled at all, for example in the repro, the index.html
imports index.ts
which contains
import './foo.ts'
console.log('foo')
and the output build Parcel serves is
/parcel-test.d7ebec59.ts
import './foo.ts'
console.log('foo')
๐ Configuration (.babelrc, package.json, cli command)
.parcelrc
{
"extends": "@parcel/config-default",
"transforms": {
"url:*": ["@parcel/transformer-raw"]
}
}
package.json
{
"name": "parcel-raw-transform",
"version": "0.0.1",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"parcel": "^2.0.0-nightly.116"
},
"scripts": {
"dev": "parcel src/index.html"
}
}
I tried with both the 2.0.0-alpha.3.2
and 2.0.0-nightly.116
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (14 by maintainers)
Commits related to this issue
- fix(core): ๐correctly set the url pipeline depending on its protocol https://github.com/parcel-bundler/parcel/issues/4174 — committed to Banou26/parcel by Banou26 4 years ago
Iโve tried again using this config
the build in
/dist/browserModern
still only containsand now in addition, even though the logs says
Server running at http://localhost:1234
iโm gettingIf i remove
--target=appModern
, then the serving server responds correctly, but iโm still getting the same original problem, which is having this errorbecause the served html file points to a
.ts
file which is not transpiled/parcel-test.d7ebec59.ts