2018-06-01 12:00:17 +00:00
|
|
|
import pkg from '../../package.json'
|
|
|
|
|
|
|
|
// Dependencies that will be installed alongise with nuxt package
|
|
|
|
const packageDependencies = Object.keys(pkg.dependencies)
|
|
|
|
|
|
|
|
// Allow built in node modules
|
|
|
|
const nodeBuiltIn = ['path', 'fs', 'module', 'crypto', 'util']
|
|
|
|
|
|
|
|
// Optional dependencies that user should install on demand
|
|
|
|
const optionalDependencies = [
|
|
|
|
// legacy build users need this
|
2018-08-10 13:45:58 +00:00
|
|
|
'@babel/polyfill'
|
2018-06-01 12:00:17 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
const externals = [].concat(
|
|
|
|
packageDependencies,
|
|
|
|
nodeBuiltIn,
|
|
|
|
optionalDependencies
|
|
|
|
)
|
|
|
|
|
|
|
|
export default externals
|