specify build directory
See original GitHub issue❔ Question
How do you specify the build directory in parcel 2? I have looked all over and can’t find the API for this. Is it only possible through some naming plugin or something? I was hoping for at least --out-dir
with the cli.
Love this tool, and thanks in advance for any feedback!
🔦 Context
I’d like to put my built files in a sub directory, like public
. That’s all.
💻 Code Sample
Currently running parcel build src/index.html
on a very minimal React app (only index.html and index.js, no other assets included, no other plugins running).
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.0.0-alpha.1.1 |
Node | 10.15.3 |
npm/Yarn | 6.11.3 |
Operating System | MacOS Mojave |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:11 (2 by maintainers)
Top Results From Across the Web
How do I build into a specified directory using the "prefix ...
You have to create a build-directory and run configure script from it. Your case: mkdir /home/james/Downloads/glibc-build/ cd ...
Read more >Configuring a build directory - The Meson Build system
These are all the options available for the current project arranged into related groups. The first column in every field is the name...
Read more >Change the build output directory - Visual Studio (Windows)
Right-click on the project node in Solution Explorer and select Properties. · Expand the Build section, and select the Output subsection.
Read more >Setting a custom build directory - next.config.js
Setting a custom build directory. You can specify a name to use for a custom build directory to use instead of .next ....
Read more >How to specify build directory? – IDEs Support (IntelliJ Platform)
I need to specify build directory (cmake-build-debug) in CMakeLists.txt file, not in Settings interface. What variables does it?
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
--dist-dir
was added in https://github.com/parcel-bundler/parcel/pull/4113@tehpsalmist there’s a reference in https://github.com/parcel-bundler/parcel/issues/3377#issuecomment-521704453 on how this is done now in Parcel 2.
Basically, the location of your
main
setting inpackage.json
is use. So: