Skip to content

Instantly share code, notes, and snippets.

@danielroe
Created May 14, 2020 10:35
Show Gist options
  • Save danielroe/144afad20d7152d2e5e1aa46f6d0d124 to your computer and use it in GitHub Desktop.
Save danielroe/144afad20d7152d2e5e1aa46f6d0d124 to your computer and use it in GitHub Desktop.
// ~/.storybook/webpack.config.js
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path')
const webpackConfig = require('../test/webpack.config.nuxt')
/* eslint-enable */
module.exports = ({ config }) => {
return {
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
'~': path.resolve(__dirname, '../src'),
},
extensions: ['.ts', '.js', '.json'],
},
module: {
...config.module,
rules: webpackConfig.module.rules,
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment