webpack.config.js 511 B

1234567891011121314151617181920212223242526272829
  1. var webpack = require("webpack");
  2. module.exports = {
  3. entry: {
  4. "rss-parser": "./index.js"
  5. },
  6. output: {
  7. path: __dirname,
  8. filename: "dist/[name].js",
  9. libraryTarget: 'umd',
  10. globalObject: 'this',
  11. library: 'RSSParser'
  12. },
  13. resolve: {
  14. extensions: ['.js']
  15. },
  16. devtool: 'source-map',
  17. module: {
  18. rules: [{
  19. test: /\.js$/,
  20. loader: 'babel-loader?presets[]=@babel/preset-env',
  21. }]
  22. },
  23. externals: {
  24. xmlbuilder:'xmlbuilder'
  25. },
  26. node: {
  27. fs: "empty"
  28. }
  29. }