question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
mischniccommented, Mar 2, 2020
10reactions
jschuurcommented, Nov 17, 2019

@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 in package.json is use. So:

"main": "dist/index.js",
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found