webpack.config.js 715 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. "use strict";
  2. const webpack = require("webpack");
  3. const fs = require("fs");
  4. module.exports = function (env) {
  5. let externals = [];
  6. if (env && env.noDeps) {
  7. console.log('Building version without deps');
  8. externals.push("eve");
  9. }
  10. return {
  11. entry: './dev/raphael.amd.js',
  12. output: {
  13. path: __dirname,
  14. filename: "raphael.js",
  15. libraryTarget: "umd",
  16. library: "Raphael"
  17. },
  18. externals: externals,
  19. plugins: [
  20. new webpack.BannerPlugin({
  21. banner: fs.readFileSync('./dev/banner.txt', 'utf8'),
  22. raw: true,
  23. entryOnly: true
  24. })
  25. ],
  26. resolve: {
  27. alias: {
  28. "eve": "eve-raphael/eve"
  29. }
  30. }
  31. };
  32. };