title: Webpack resolve.alias breaks import of libraries prefixed with an @
body: <p>I am working on a Vue project where I'm attempting to use VuexORM. Upon initial install, I was getting an odd error:
  <code>Module not found: Error: Can't resolve '../uex-orm/core'</code>.</p>
  
  <p>It should instead be <code>../@vuex-orm/core</code> (notice it's missing the @ and 'v' character).</p>
  
  <p>I double-checked that I hadn't mistyped my imports. Then I realized that I'd implemented an alias so that I could import from the src/ directory with an @ symbol, which I believe explains the odd-looking import. I must have misconfigured my webpack or .babelrc (very possible because I suck at both).</p>
  
  <p>How should I go about setting up my <code>webpack.config.js</code> and/or <code>.babelrc</code> so that I can both use an alias for imports as well as import libraries such as @vuex-orm?</p>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const Dotenv = require('dotenv-webpack');
  
  module.exports = {
    mode: 'development',
    resolve: {
      extensions: ['.js', '.vue'],
    },
    module: {
      rules: [
        {
          test: /\.vue?$/,
          exclude: /(node_modules)/,
          use: 'vue-loader',
        },
        {
          test: /\.js?$/,
          exclude: /(node_modules)/,
          use: 'babel-loader',
        },
        {
          test: /\.css$/,
          use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
        },
        {
          test: /\.sass$/,
          use: [
            'vue-style-loader',
            'css-loader',
            {
              loader: 'sass-loader',
              options: {
                indentedSyntax: true,
              },
            },
          ],
        },
        {
          test: /\.svg$/,
          loader: 'svg-inline-loader',
        },
      ],
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: './src/index.html',
      }),
      new Dotenv(),
    ],
  
    devServer: {
      historyApiFallback: true,
    },
    externals: {
      // global app config object
      config: JSON.stringify({
        apiUrl: 'http://localhost:3000',
      }),
    },
  }
  </code></pre>
  
  <p><strong>.babelrc</strong></p>
  
  <pre><code>{
    "presets": [
        "env",
        "stage-0"
    ],
    "plugins": [
      ["babel-plugin-root-import", {
        "rootPathSuffix": "src/",
        "rootPathPrefix": "@"
      }]
    ]
  }
  </code></pre>