微小悟公众号管理系统

webpack.debug.conf.js 904B

12345678910111213141516171819202122232425262728293031323334353637
  1. // This is the webpack config used for unit tests.
  2. var utils = require('./utils')
  3. var webpack = require('webpack')
  4. var merge = require('webpack-merge')
  5. var baseConfig = require('./webpack.base.conf')
  6. var webpackConfig = merge(baseConfig, {
  7. // use inline sourcemap for karma-sourcemap-loader
  8. module: {
  9. rules: utils.styleLoaders()
  10. },
  11. devtool: '#inline-source-map',
  12. resolve: {
  13. alias: {
  14. 'vue': 'vue/dist/vue.esm.js',
  15. }
  16. },
  17. resolveLoader: {
  18. alias: {
  19. // necessary to to make lang="scss" work in test when using vue-loader's ?inject option
  20. // see discussion at https://github.com/vuejs/vue-loader/issues/724
  21. 'scss-loader': 'sass-loader'
  22. }
  23. },
  24. plugins: [
  25. new webpack.DefinePlugin({
  26. 'process.env': require('../config/debug.env')
  27. })
  28. ]
  29. })
  30. // no need for app entry during tests
  31. delete webpackConfig.entry
  32. module.exports = webpackConfig