2018-02-06 02:36:22 +00:00
|
|
|
const path = require('path')
|
2018-03-21 01:52:08 +00:00
|
|
|
const nuxtConf = require('../nuxt.config')
|
2018-02-06 02:36:22 +00:00
|
|
|
|
|
|
|
module.exports = (sBaseConfig, configType, defaultConfig) => {
|
2018-03-21 01:52:08 +00:00
|
|
|
const srcDir = `../${nuxtConf.srcDir || ''}`
|
|
|
|
const rootDir = `../${nuxtConf.rootDir || ''}`
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-02-06 11:56:28 +00:00
|
|
|
Object.assign(defaultConfig.resolve.alias, {
|
2018-03-21 01:52:08 +00:00
|
|
|
'~~': path.resolve(__dirname, rootDir),
|
|
|
|
'~': path.resolve(__dirname, srcDir)
|
2018-02-06 11:56:28 +00:00
|
|
|
})
|
2018-02-06 02:36:22 +00:00
|
|
|
|
2018-02-06 11:56:28 +00:00
|
|
|
return defaultConfig
|
|
|
|
}
|