webpack.config.js 821 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. var path = require("path");
  2. var es3ifyPlugin = require("es3ify-webpack-plugin");
  3. module.exports = {
  4. entry: "./index.js",
  5. output: {
  6. filename: "boundle.js",
  7. path: path.resolve(__dirname, "webpack/"),
  8. publicPath: "/test/"
  9. },
  10. module: {
  11. rules: [
  12. {
  13. test: /\.js$/,
  14. include: [path.resolve(__dirname, "./index.js")],
  15. use: {
  16. loader: "babel-loader"
  17. }
  18. }
  19. ]
  20. },
  21. plugins:[
  22. new es3ifyPlugin()
  23. ],
  24. devServer: {
  25. disableHostCheck: true,
  26. progress: true,
  27. proxy: {
  28. "/api/*": {
  29. target: "http://0.0.0.0:9000",
  30. changeOrigin: true,
  31. secure: false
  32. }
  33. },
  34. host: "0.0.0.0",
  35. port: 8000,
  36. contentBase: path.join(__dirname, "./"),
  37. publicPath: "/webpack/",
  38. hot: true,
  39. inline: false
  40. }
  41. };