You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
720 B

  1. const path = require('path');
  2. const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
  3. module.exports = {
  4. entry: "./jalali-moment.js", // string | object | array
  5. output: {
  6. path: path.resolve(__dirname, "dist"), // string
  7. filename: "jalali-moment.js", // string
  8. // the url to the output directory resolved relative to the HTML page
  9. library: "jalali-moment", // string,
  10. // the name of the exported library
  11. libraryTarget: "umd", // universal module definition
  12. // the type of the exported library
  13. },
  14. mode: 'production',
  15. plugins: [
  16. // new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fa/),
  17. new UglifyJSPlugin()
  18. ]
  19. }