-
-
Save morcegon/aa63062cc1f4180688b5ef51823e66f6 to your computer and use it in GitHub Desktop.
Resolve Alias on Webpack (Vuejs, React, etc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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