webpack.dev.js 805 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. const merge = require('webpack-merge')
  2. const path = require('path')
  3. const common = require('./webpack.common.js')
  4. module.exports = merge(common, {
  5. mode: "development",
  6. entry: './src/index.ts',
  7. module: {
  8. rules: [
  9. {
  10. test: /\.ts$/,
  11. use: 'ts-loader',
  12. exclude: /node_modules/
  13. }
  14. ]
  15. },
  16. output: {
  17. filename: 'qiniu.min.js',
  18. library: 'qiniu',
  19. libraryTarget: 'umd',
  20. path: path.resolve(__dirname, 'webpack'),
  21. },
  22. devServer: {
  23. disableHostCheck: true,
  24. progress: true,
  25. hot: true,
  26. proxy: {
  27. '/api/*': {
  28. target: 'http://0.0.0.0:9000',
  29. changeOrigin: true,
  30. secure: false
  31. }
  32. },
  33. host: '0.0.0.0',
  34. contentBase: path.join(__dirname, './'),
  35. publicPath: '/webpack/',
  36. inline: false
  37. }
  38. })