Timers and other features for Heroes of the Storm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

97 lines
2.5 KiB

  1. /*
  2. * Copyright © 2021 Adrien Agez <adrien.agez@pm.me>
  3. *
  4. * This file is part of Nexus Timers.
  5. *
  6. * Nexus Timers is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Nexus Timers is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with Nexus Timers. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. 'use strict'
  20. const path = require('path')
  21. const utils = require('./utils')
  22. const config = require('../config')
  23. const vueLoaderConfig = require('./vue-loader.conf')
  24. function resolve (dir) {
  25. return path.join(__dirname, '..', dir)
  26. }
  27. module.exports = {
  28. entry: {
  29. app: './src/main.js'
  30. },
  31. output: {
  32. path: config.build.assetsRoot,
  33. filename: '[name].js',
  34. publicPath: process.env.NODE_ENV === 'production'
  35. ? config.build.assetsPublicPath
  36. : config.dev.assetsPublicPath
  37. },
  38. resolve: {
  39. extensions: ['.js', '.vue', '.json'],
  40. alias: {
  41. 'vue$': 'vue/dist/vue.esm.js',
  42. '@': resolve('src')
  43. }
  44. },
  45. module: {
  46. rules: [
  47. {
  48. test: /\.(js|vue)$/,
  49. loader: 'eslint-loader',
  50. enforce: 'pre',
  51. include: [resolve('src'), resolve('test')],
  52. options: {
  53. formatter: require('eslint-friendly-formatter')
  54. }
  55. },
  56. {
  57. test: /\.vue$/,
  58. loader: 'vue-loader',
  59. options: vueLoaderConfig
  60. },
  61. {
  62. test: /\.js$/,
  63. loader: 'babel-loader',
  64. include: [resolve('src'), resolve('test')]
  65. },
  66. {
  67. test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
  68. loader: 'url-loader',
  69. options: {
  70. limit: 10000,
  71. name: utils.assetsPath('img/[name].[hash:7].[ext]')
  72. }
  73. },
  74. {
  75. test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
  76. loader: 'url-loader',
  77. options: {
  78. limit: 10000,
  79. name: utils.assetsPath('media/[name].[hash:7].[ext]')
  80. }
  81. },
  82. {
  83. test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
  84. loader: 'url-loader',
  85. options: {
  86. limit: 10000,
  87. name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
  88. }
  89. }
  90. ]
  91. }
  92. }