webpack.config.js 783 B

12345678910111213141516171819202122232425262728
  1. module.exports = {
  2. mode: process.env.NODE_ENV,
  3. entry: ["./src/index.js"],
  4. output: {
  5. library: "VueSocketIO",
  6. libraryTarget: "umd",
  7. libraryExport: "default",
  8. filename: "vue-socketio.js",
  9. globalObject: "typeof self !== 'undefined' ? self : this"
  10. },
  11. module: {
  12. rules: [
  13. {
  14. test: /\.js$/,
  15. exclude: /node_modules/,
  16. use: {
  17. loader: "babel-loader",
  18. options: {
  19. plugins: [
  20. "@babel/plugin-proposal-class-properties",
  21. "@babel/plugin-transform-classes"
  22. ]
  23. }
  24. }
  25. }
  26. ]
  27. }
  28. };