mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
remove NUXT_APP_DIR env
This commit is contained in:
parent
7be51b410a
commit
582e8179f4
19
index.js
19
index.js
@ -1,30 +1,21 @@
|
||||
/*!
|
||||
* Nuxt.js
|
||||
* (c) 2016-2017 Chopin Brothers
|
||||
* Core maintainer: Pooya (@pi0)
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
const path = require('path')
|
||||
|
||||
process.noDeprecation = true
|
||||
|
||||
// Node Source Map Support
|
||||
// https://github.com/evanw/node-source-map-support
|
||||
require('source-map-support').install();
|
||||
|
||||
// Fix babel flag
|
||||
process.noDeprecation = true
|
||||
|
||||
// Require Core
|
||||
const Core = require('./dist/core.js')
|
||||
// Object.assign(exports, Core.default || Core)
|
||||
|
||||
// Require Builder
|
||||
const Builder = require('./dist/builder')
|
||||
// Object.assign(exports, Builder.default || Builder)
|
||||
|
||||
// FIXME
|
||||
Object.assign(Core.default || Core, Builder.default || Builder)
|
||||
module.exports = Core.default || Core
|
||||
|
||||
// Use special env flag to specify app dir without modify builder
|
||||
if (!process.env.NUXT_APP_DIR) {
|
||||
process.env.NUXT_APP_DIR = path.resolve(__dirname, 'lib/app')
|
||||
}
|
||||
module.exports = Object.assign(Core, Builder)
|
||||
|
@ -57,7 +57,7 @@ const defaultOptions = {
|
||||
dev: (process.env.NODE_ENV !== 'production'),
|
||||
runBuild: false,
|
||||
buildDir: '.nuxt',
|
||||
nuxtAppDir: process.env.NUXT_APP_DIR || resolve(__dirname, '../lib/app'), // Relative to dist
|
||||
nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
|
||||
build: {
|
||||
analyze: false,
|
||||
extractCSS: false,
|
||||
|
Loading…
Reference in New Issue
Block a user