Nuxt/examples/storybook/.storybook/webpack.config.js

16 lines
428 B
JavaScript
Raw Normal View History

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