Next.js: Specify a different build directory instead of .next

Created on 26 Mar 2017  路  9Comments  路  Source: vercel/next.js

I am trying to deploy next to Firebase functions, and It looks like the .next build directory is ignored by firebase cli.

Firebase cli seems to ignore all hidden files, so I want to use a differently named directory.

The directory seems to be hardcoded in 3 places:
/dist/bin/next-start
/dist/server/build/clean.js
/dist/server/build/index.js

Most helpful comment

no worries, got some of it done last night. WIll continue with it tonight 馃憤

All 9 comments

Would this be something that would like to be added via config? maybe next.config? If so, I can take a look at this?

Yep. That's the api we could do it.

Im having a look at this now. Is there any standards or practices against config? For sake of testing it out im running the following in next.config:

module.exports = {
  options: {
    dest: 'dist'
  }
}

Have any other ideas?

I'd like to see it like this:

module.exports = {
  options: {
    dist: '.next'
  }
}

no worries, got some of it done last night. WIll continue with it tonight 馃憤

Pr incoming for this; just updating documentation.

@abstractpoint @arunoda https://github.com/zeit/next.js/pull/1599 Opened a PR for it; let me know if any issues.
Cheers

@abstractpoint this is now merged if you want to try on latest master.

@alexnewmannn Working great, super useful. Thank you for putting in the time! (Still battling with Firebase being too slow running next, but that's not really related)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swrdfish picture swrdfish  路  3Comments

olifante picture olifante  路  3Comments

jesselee34 picture jesselee34  路  3Comments

formula349 picture formula349  路  3Comments

ghost picture ghost  路  3Comments