Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Resolve Webpack alias in Webstorm

Resolve Webpack alias in Webstorm

import UiButton from '@/components/UiButton'
import UiDataBox from '@/components/UiDataBox'

By default WebStorm will analyse the webpack configuration file in the root of the project, but you can select another file in Preferences | Languages & Frameworks | JavaScript | Webpack

For Vue cli v3



// webpack.config.js

module.exports = {
  resolve: {
    alias: {
      '@': require('path').resolve(__dirname, 'src')
Copy link

CAT6e commented Jun 29, 2020

It works! Thank you ❤️

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