mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +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
|
* Nuxt.js
|
||||||
* (c) 2016-2017 Chopin Brothers
|
* (c) 2016-2017 Chopin Brothers
|
||||||
|
* Core maintainer: Pooya (@pi0)
|
||||||
* Released under the MIT License.
|
* Released under the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
process.noDeprecation = true
|
|
||||||
|
|
||||||
// Node Source Map Support
|
// Node Source Map Support
|
||||||
// https://github.com/evanw/node-source-map-support
|
// https://github.com/evanw/node-source-map-support
|
||||||
require('source-map-support').install();
|
require('source-map-support').install();
|
||||||
|
|
||||||
|
// Fix babel flag
|
||||||
|
process.noDeprecation = true
|
||||||
|
|
||||||
// Require Core
|
// Require Core
|
||||||
const Core = require('./dist/core.js')
|
const Core = require('./dist/core.js')
|
||||||
// Object.assign(exports, Core.default || Core)
|
|
||||||
|
|
||||||
// Require Builder
|
// Require Builder
|
||||||
const Builder = require('./dist/builder')
|
const Builder = require('./dist/builder')
|
||||||
// Object.assign(exports, Builder.default || Builder)
|
|
||||||
|
|
||||||
// FIXME
|
module.exports = Object.assign(Core, Builder)
|
||||||
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')
|
|
||||||
}
|
|
||||||
|
@ -57,7 +57,7 @@ const defaultOptions = {
|
|||||||
dev: (process.env.NODE_ENV !== 'production'),
|
dev: (process.env.NODE_ENV !== 'production'),
|
||||||
runBuild: false,
|
runBuild: false,
|
||||||
buildDir: '.nuxt',
|
buildDir: '.nuxt',
|
||||||
nuxtAppDir: process.env.NUXT_APP_DIR || resolve(__dirname, '../lib/app'), // Relative to dist
|
nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
|
||||||
build: {
|
build: {
|
||||||
analyze: false,
|
analyze: false,
|
||||||
extractCSS: false,
|
extractCSS: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user