Skip to content

Instantly share code, notes, and snippets.

@markni
Created June 3, 2018 23:55
Show Gist options
  • Save markni/fd03686377cfa89a3f386f32984fb6bb to your computer and use it in GitHub Desktop.
Save markni/fd03686377cfa89a3f386f32984fb6bb to your computer and use it in GitHub Desktop.
Vue-cli 3 webpack resolve alias config
module.exports = {
resolve: {
alias: {
"@": require("path").resolve(__dirname, "src")
}
}
};
@daveberning
Copy link

I tried adding this into my Vue CLI 3 project and it doesn't work. I tried replacing "@" with "@root", and it still does not work.

@amiroff
Copy link

amiroff commented Apr 11, 2019

@daveberning make sure to point to file in Webstorm settings > Languages & Frameworks > Javascript > Webpack. Worked for me with latest vue cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment