微小悟公众号管理系统

webpack.test.conf.js 830B

1234567891011121314151617181920212223242526272829303132
  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. resolveLoader: {
  13. alias: {
  14. // necessary to to make lang="scss" work in test when using vue-loader's ?inject option
  15. // see discussion at https://github.com/vuejs/vue-loader/issues/724
  16. 'scss-loader': 'sass-loader'
  17. }
  18. },
  19. plugins: [
  20. new webpack.DefinePlugin({
  21. 'process.env': require('../config/test.env')
  22. })
  23. ]
  24. })
  25. // no need for app entry during tests
  26. delete webpackConfig.entry
  27. module.exports = webpackConfig