Nuxt/examples/storybook/.storybook/webpack.config.js
2018-02-06 02:36:22 +00:00

15 lines
441 B
JavaScript

const webpack = require('webpack')
const path = require('path')
const nxtConf = require('../nuxt.config')
module.exports = (sBaseConfig, configType, defaultConfig) => {
const srcDir = `../${nxtConf.srcDir||''}`
const rootDir = `../${nxtConf.rootDir||''}`
Object.assign(defaultConfig.resolve.alias, {
'~~': path.resolve(__dirname, rootDir),
'~': path.resolve(__dirname, srcDir)
})
return defaultConfig
}