webpack.config.js 590 B

1234567891011121314151617181920212223242526272829
  1. const path = require('path');
  2. function resolve (dir) {
  3. return path.join(__dirname, '/', dir);
  4. }
  5. module.exports = {
  6. resolve:{
  7. /* 定义别名简化使用方案 */
  8. alias:{
  9. $controls: resolve('src/control/'),
  10. $utils: resolve('src/utils/'),
  11. $mixins: resolve('src/mixins/'),
  12. $config: resolve('src/config/'),
  13. $components: resolve('src/components/'),
  14. $pages: resolve('src/pages/'),
  15. $layout: resolve('src/layout/'),
  16. $assets: resolve('src/assets/'),
  17. $views: resolve('src/views/'),
  18. $popup: resolve('src/popup/'),
  19. $const: resolve('src/const/')
  20. },
  21. }
  22. };