Closed gillyspy closed 1 year ago
It works with build
but not server
nor watch
.
{
"scripts": {
"watch-js": "parcel serve --target resources",
"build-js": "parcel build --target resources",
"watch": "concurrently -n w-tailwind,w-js -c cyan,yellow \"npm run watch-tailwind\" \"npm run watch-js\"",
"build": "npm run build-tailwind && npm run build-js"
},
}
I want to compile target resources
into /dist/resources
.
{
"targets": {
"resources": {
"source": [
"resources/resources.html"
],
"publicUrl": "dist/resources/",
"distDir": "dist/resources",
"engines": {
"browsers": "> 1%"
}
}
},
}
Software | Version(s) |
---|---|
Parcel | 2.6.0 |
Node | 16.13.1 |
npm/Yarn | 8.5.5 |
Operating System | Windows 11(21H2) |
I'm also experiencing this. Here's a reproduction repo.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.
🐛 bug report
watch
combined with--target
does not build according to the target's options🎛 Configuration (.babelrc, package.json, cli command)
see sampe below
🤔 Expected Behavior
I would expect these two commands to generate the same output:
parcel watch --target mytarget
parcel bulid --target mytarget
😯 Current Behavior
the
build
command works as expected from the target's options but the watch does not use them💁 Possible Solution
not sure
🔦 Context
i can't use watch
i think the expected behaviour is pretty MVP
💻 Code Sample
ane example target i have is:
🌍 Your Environment