Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Nuxt compiles in production mode fix #102

Closed
wants to merge 3 commits into from
Closed

Nuxt compiles in production mode fix #102

wants to merge 3 commits into from

Conversation

ysfada
Copy link

@ysfada ysfada commented Jun 4, 2018

#90

@ysfada ysfada changed the title fix for #90 Nuxt compiles in production mode fix Jun 4, 2018
@HapLifeMan
Copy link

Very helpful! It prevents to build for each instance when we run npm run start in production!
Can you please merge it @atinux? 😁🙏🏻

@richie3366
Copy link

Little warning about this PR: it will also overwrite app.context.env.NODE_ENV and cause trouble if you want to share the real env with the client in a pre-built bundle.

A workaround would be to rely on a IS_BUILD env var.

Suggested changes :

package.json

    "build": "cross-env IS_BUILD=1 node ./ace nuxtbuild",

app/Services/Nuxt.js

    if (dev || Env.get('IS_BUILD') === '1')
      return new Builder(this.nuxt).build()

@atinux atinux closed this May 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants