Timers and other features for Heroes of the Storm
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

webpack.base.conf.js 1.8 KiB

il y a 4 ans
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. 'use strict'
  2. const path = require('path')
  3. const utils = require('./utils')
  4. const config = require('../config')
  5. const vueLoaderConfig = require('./vue-loader.conf')
  6. function resolve (dir) {
  7. return path.join(__dirname, '..', dir)
  8. }
  9. module.exports = {
  10. entry: {
  11. app: './src/main.js'
  12. },
  13. output: {
  14. path: config.build.assetsRoot,
  15. filename: '[name].js',
  16. publicPath: process.env.NODE_ENV === 'production'
  17. ? config.build.assetsPublicPath
  18. : config.dev.assetsPublicPath
  19. },
  20. resolve: {
  21. extensions: ['.js', '.vue', '.json'],
  22. alias: {
  23. 'vue$': 'vue/dist/vue.esm.js',
  24. '@': resolve('src')
  25. }
  26. },
  27. module: {
  28. rules: [
  29. {
  30. test: /\.(js|vue)$/,
  31. loader: 'eslint-loader',
  32. enforce: 'pre',
  33. include: [resolve('src'), resolve('test')],
  34. options: {
  35. formatter: require('eslint-friendly-formatter')
  36. }
  37. },
  38. {
  39. test: /\.vue$/,
  40. loader: 'vue-loader',
  41. options: vueLoaderConfig
  42. },
  43. {
  44. test: /\.js$/,
  45. loader: 'babel-loader',
  46. include: [resolve('src'), resolve('test')]
  47. },
  48. {
  49. test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
  50. loader: 'url-loader',
  51. options: {
  52. limit: 10000,
  53. name: utils.assetsPath('img/[name].[hash:7].[ext]')
  54. }
  55. },
  56. {
  57. test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
  58. loader: 'url-loader',
  59. options: {
  60. limit: 10000,
  61. name: utils.assetsPath('media/[name].[hash:7].[ext]')
  62. }
  63. },
  64. {
  65. test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
  66. loader: 'url-loader',
  67. options: {
  68. limit: 10000,
  69. name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
  70. }
  71. }
  72. ]
  73. }
  74. }