2018-03-27 22:28:17 +00:00
|
|
|
/*!
|
|
|
|
* Nuxt.js
|
|
|
|
* (c) 2016-2018 Chopin Brothers
|
|
|
|
* Core maintainers: Pooya Parsa (@pi0) - Clark Du (@clarkdo)
|
|
|
|
* Released under the MIT License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
const fs = require('fs')
|
2018-03-28 05:32:32 +00:00
|
|
|
const path = require('path')
|
2018-03-27 22:28:17 +00:00
|
|
|
|
2018-08-31 18:21:41 +00:00
|
|
|
if (fs.existsSync(path.resolve(__dirname, '.babelrc'))) {
|
2018-06-01 12:26:13 +00:00
|
|
|
// Use esm version when using linked repository to prevent builds
|
2018-08-31 18:21:41 +00:00
|
|
|
const requireModule = require('esm')(module, {})
|
|
|
|
module.exports = requireModule('./lib/index.js').default
|
2018-03-28 05:32:32 +00:00
|
|
|
} else {
|
2018-06-01 12:26:13 +00:00
|
|
|
// Use production bundle by default
|
2018-03-28 05:32:32 +00:00
|
|
|
module.exports = require('./dist/nuxt.js')
|
2018-03-27 22:28:17 +00:00
|
|
|
}
|