Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

52 Zeilen
1.3 KiB

  1. /**
  2. * @prettier
  3. */
  4. /** Dev Note:
  5. * StatsWriterPlugin is disabled by default; uncomment to enable
  6. * when enabled, rebuilding the bundle will cause error for assetSizeLimit,
  7. * which we want to keep out of CI/CD
  8. * post build, cli command: npx webpack-bundle-analyzer <path>
  9. */
  10. import configBuilder from "./_config-builder"
  11. import { DuplicatesPlugin } from "inspectpack/plugin"
  12. import { WebpackBundleSizeAnalyzerPlugin } from "webpack-bundle-size-analyzer"
  13. // import path from "path"
  14. // import { StatsWriterPlugin } from "webpack-stats-plugin"
  15. const result = configBuilder(
  16. {
  17. minimize: true,
  18. mangle: true,
  19. sourcemaps: true,
  20. includeDependencies: true,
  21. },
  22. {
  23. entry: {
  24. "swagger-ui-bundle": [
  25. "./src/index.js",
  26. ],
  27. },
  28. output: {
  29. globalObject: "this",
  30. library: "SwaggerUIBundle",
  31. },
  32. plugins: [
  33. new DuplicatesPlugin({
  34. // emit compilation warning or error? (Default: `false`)
  35. emitErrors: false,
  36. // display full duplicates information? (Default: `false`)
  37. verbose: false,
  38. }),
  39. new WebpackBundleSizeAnalyzerPlugin("log.bundle-sizes.swagger-ui.txt"),
  40. // new StatsWriterPlugin({
  41. // filename: path.join("log.bundle-stats.swagger-ui.json"),
  42. // fields: null,
  43. // }),
  44. ]
  45. }
  46. )
  47. export default result