Skip to content

Instantly share code, notes, and snippets.

@saramarie
Created August 12, 2019 18:22
Show Gist options
  • Select an option

  • Save saramarie/9f93e427ebf5cd157922b059311719e4 to your computer and use it in GitHub Desktop.

Select an option

Save saramarie/9f93e427ebf5cd157922b059311719e4 to your computer and use it in GitHub Desktop.
Adding aliases for directories in Webpack
module.exports = {
module: {
rules: [
cssRule, // can set the loaders to a constant
jsxRule, // same as above
],
},
resolve: {
alias: {
// use the relative path to the aliased directory, starting from .storybook
someDir: path.resolve(__dirname, 'path/to/dir/rel/to/.storybook')
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment