mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
improve link mode detection
don't use dist unless inside an npm package or explicitly used
This commit is contained in:
parent
b5c3eabbaa
commit
aad15b5a5c
7
index.js
7
index.js
@ -6,9 +6,10 @@
|
||||
*/
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
if (fs.existsSync('dist/nuxt.js')) {
|
||||
module.exports = require('./dist/nuxt.js')
|
||||
} else {
|
||||
if (fs.existsSync(path.resolve(__dirname, '.babelrc'))) {
|
||||
module.exports = require('./lib/index.js')
|
||||
} else {
|
||||
module.exports = require('./dist/nuxt.js')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user