-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
V2: How to control dist
directory
#3820
Comments
dist
directory dist
directory
Parcel 2 can do multiple "builds" at once, so a global dist dir didn't make sense anymore. In your case, adding this entry to your package.json should work: {
// ...
default: "dist/server/public/js/index.js"
// ...
}
That would definitely be part of the docs (yet to be written). |
@mischnic I see. I wouldn't mind opening a PR on how to migrate building from v1 to v2. I'm sure I'll need some suggestions from reviews, though. Is that something that would go in the root 'README` ? |
The readme was originally the specification for Parcel 2 and unfortunately serves as documentation as well. This documentation should really go onto the website (https://github.com/parcel-bundler/website) but we haven't really setup anything yet. |
Is it possible to output the Otherwise testing the actual http serving files is not possible, there's no dist :) |
It's currently always in With |
If you have scripts like "scripts": {
"build:client": "parcel build client/index.html --out-dir dist/client",
"build:server": "parcel build server/index.js --target node --out-dir dist/server",
} How would you migrate that to v2? |
@vladinator1000 At the moment, the only way is a monorepo-like setup (so with package.json in |
How about prod vs. dev/debug? |
In the meantime, |
Dude, this work is people's free time. If it doesn't work for you, go build it yourself. |
Both of your problems are listed here in the migration guide:
It's not our responsibility to meet your deadline. |
@mischnic - sorry for wasting your time - deleted all my comments |
|
@eduardobcastro You probably have a |
This worked for me thanks! |
its worked for me |
@mischnic in the monorepo setup, what’s the best way to ask for each |
@jamesvclements did you check out https://parceljs.org/getting-started/library/? You can define targets in each package.json (e.g. |
@devongovett My repo structure looks like this:
The root
and the
but running |
i don't have main: "index.html" this but it is also not working |
My project is built with React and the server is apps-script. When I make changes the React index.html generates the changes to apps-script.
error: unknown option `--dist-dir' |
@mischnic I do have it as: |
Parcel Version: 2.0.0-alpha.3.1
OS: Ubuntu 18.04
Context:
I have a pretty simple use case that worked well with parcel 1.x
Basically, I have a server that serves out of public directory where I'd like my build to be placed.
Example:
/server/public/js
In Parcel's previous version, I just used the
-d
option to do something like:parcel watch ./app/client/src/index.tsx -d ./dist/server/public/js
or
parcel build ./app/client/src/index.tsx -d ./dist/server/public/js
In the current version, I receive an error:
error: unknown option -d
I've tried finding this option via the README,
parcel --help build
, and searching "dist" on the repo. If this is documented somewhere, it's not clear and/or buried.Questions
Is there a migrating guide?
Can I control where output is placed?
Coming from other configuration tools, this has been a godsend. So, thanks for the ease of use.
The text was updated successfully, but these errors were encountered: