Skip to content

Instantly share code, notes, and snippets.

@morcegon
Created May 22, 2018 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morcegon/aa63062cc1f4180688b5ef51823e66f6 to your computer and use it in GitHub Desktop.
Save morcegon/aa63062cc1f4180688b5ef51823e66f6 to your computer and use it in GitHub Desktop.
Resolve Alias on Webpack (Vuejs, React, etc)
you can solve this problem with that
# config
```
alias: {
'vue$': 'vue/dist/vue.common.js',
'assets': path.resolve(__dirname, './src/assets'),
'components': path.resolve(__dirname, './src/components')
}
import
@import '~assets/func.styl'
```
I’ve tried it can work !
# the key is that you need add a "~" in front of your alias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment