WEBPACKCONFIG 自动跳转 webstorm

'use strict'
const path = require('path')
 
function resolve(dir) {
  return path.join(__dirname, '.', dir)
}
 
module.exports = {
  context: path.resolve(__dirname, './'),
  resolve: {
    extensions: ['.js', '.vue', '.json'],
    alias: {
      '@': path.resolve('src'),
      '@assets': path.resolve(__dirname, 'src/assets'),
      '@pages': path.resolve(__dirname, 'src/pages'),
      '@comp': path.resolve(__dirname, 'src/components'),
      '@api': path.resolve(__dirname, 'src/api'),
      '@plug': path.resolve(__dirname, 'src/plugins'),
      '@utils': path.resolve(__dirname, 'src/utils')
    }
  }
}

  

posted @ 2022-02-17 10:07  Daniel_Lu  阅读(64)  评论(0编辑  收藏  举报