@teambit/react 0.0.691 → 0.0.694

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/apps/web/react.application.ts +17 -0
  2. package/artifacts/env-template/public/283.js +34 -1
  3. package/artifacts/env-template/public/569.js +74 -0
  4. package/artifacts/env-template/public/677.js +4 -1
  5. package/artifacts/env-template/public/747.js +30 -0
  6. package/artifacts/env-template/public/750.js +86 -2
  7. package/artifacts/env-template/public/793.js +752 -16
  8. package/artifacts/env-template/public/assets-manifest.json +17 -17
  9. package/artifacts/env-template/public/compositions.2a8ba84c17aa03cbdd9d.js +1 -0
  10. package/artifacts/env-template/public/compositions.html +1 -1
  11. package/artifacts/env-template/public/overview.c7c244a3a8bbfec26757.js +5 -0
  12. package/artifacts/env-template/public/overview.html +1 -1
  13. package/artifacts/env-template/public/peers.b1e5a815a97146071b4a.js +1 -0
  14. package/artifacts/env-template/public/preview-root.36d217e87edeb331bd4e.js +1 -0
  15. package/artifacts/env-template/public/runtime.js +1 -1
  16. package/artifacts/env-template/public/service-worker.js +1 -1
  17. package/artifacts/env-template/public/static/css/793.2d42cfc4.css +1 -0
  18. package/artifacts/env-template/public/static/css/{previewRoot.1262db93.css → previewRoot.a16607da.css} +1 -1
  19. package/artifacts/preview/teambit_react_react-preview.js +11 -1
  20. package/{compositions-1648386827284.js → compositions-1648659683881.js} +0 -0
  21. package/dist/apps/web/react.application.js +39 -0
  22. package/dist/apps/web/react.application.js.map +1 -1
  23. package/dist/webpack/webpack.config.base.prod.js +52 -37
  24. package/dist/webpack/webpack.config.base.prod.js.map +1 -1
  25. package/{overview-1648386827284.js → overview-1648659683881.js} +0 -0
  26. package/package-tar/teambit-react-0.0.694.tgz +0 -0
  27. package/package.json +33 -31
  28. package/{preview-1648386827284.js → preview-1648659683881.js} +2 -2
  29. package/webpack/webpack.config.base.prod.ts +50 -34
  30. package/artifacts/env-template/public/420.js +0 -1
  31. package/artifacts/env-template/public/934.js +0 -1
  32. package/artifacts/env-template/public/compositions.a2c81bb414bb03918d09.js +0 -1
  33. package/artifacts/env-template/public/overview.b2a3c1f5a7bff688b748.js +0 -1
  34. package/artifacts/env-template/public/peers.f0c76108cfe204de95bd.js +0 -1
  35. package/artifacts/env-template/public/preview-root.a1f71de58f10102ed2c6.js +0 -1
  36. package/artifacts/env-template/public/static/css/793.253dc893.css +0 -1
  37. package/package-tar/teambit-react-0.0.691.tgz +0 -0
@@ -24,44 +24,60 @@ export default function (externalizePeer: boolean, peers: string[], dev?: boolea
24
24
  : {
25
25
  minimize: true,
26
26
  minimizer: [
27
- // This is only used in production mode
28
27
  new TerserPlugin({
29
- extractComments: false,
28
+ minify: TerserPlugin.esbuildMinify,
29
+ // `terserOptions` options will be passed to `esbuild`
30
+ // Link to options - https://esbuild.github.io/api/#minify
31
+ // Note: the `minify` options is true by default (and override other `minify*` options), so if you want to disable the `minifyIdentifiers` option (or other `minify*` options) please use:
30
32
  terserOptions: {
31
- parse: {
32
- // We want terser to parse ecma 8 code. However, we don't want it
33
- // to apply any minification steps that turns valid ecma 5 code
34
- // into invalid ecma 5 code. This is why the 'compress' and 'output'
35
- // sections only apply transformations that are ecma 5 safe
36
- // https://github.com/facebook/create-react-app/pull/4234
37
- ecma: 8,
38
- },
39
- compress: {
40
- ecma: 5,
41
- warnings: false,
42
- // Disabled because of an issue with Uglify breaking seemingly valid code:
43
- // https://github.com/facebook/create-react-app/issues/2376
44
- // Pending further investigation:
45
- // https://github.com/mishoo/UglifyJS2/issues/2011
46
- comparisons: false,
47
- // Disabled because of an issue with Terser breaking valid code:
48
- // https://github.com/facebook/create-react-app/issues/5250
49
- // Pending further investigation:
50
- // https://github.com/terser-js/terser/issues/120
51
- inline: 2,
52
- },
53
- mangle: {
54
- safari10: true,
55
- },
56
- output: {
57
- ecma: 5,
58
- comments: false,
59
- // Turned on because emoji and regex is not minified properly using default
60
- // https://github.com/facebook/create-react-app/issues/2488
61
- ascii_only: true,
62
- },
33
+ minify: false,
34
+ minifyWhitespace: true,
35
+ // We don't want to minify identifiers to enable easier debugging on remote scopes when there are preview issues
36
+ minifyIdentifiers: false,
37
+ // minifyIdentifiers: true,
38
+ minifySyntax: true,
63
39
  },
40
+ // terserOptions: {},
64
41
  }),
42
+
43
+ // This is only used in production mode
44
+ // new TerserPlugin({
45
+ // extractComments: false,
46
+ // terserOptions: {
47
+ // parse: {
48
+ // // We want terser to parse ecma 8 code. However, we don't want it
49
+ // // to apply any minification steps that turns valid ecma 5 code
50
+ // // into invalid ecma 5 code. This is why the 'compress' and 'output'
51
+ // // sections only apply transformations that are ecma 5 safe
52
+ // // https://github.com/facebook/create-react-app/pull/4234
53
+ // ecma: 8,
54
+ // },
55
+ // compress: {
56
+ // ecma: 5,
57
+ // warnings: false,
58
+ // // Disabled because of an issue with Uglify breaking seemingly valid code:
59
+ // // https://github.com/facebook/create-react-app/issues/2376
60
+ // // Pending further investigation:
61
+ // // https://github.com/mishoo/UglifyJS2/issues/2011
62
+ // comparisons: false,
63
+ // // Disabled because of an issue with Terser breaking valid code:
64
+ // // https://github.com/facebook/create-react-app/issues/5250
65
+ // // Pending further investigation:
66
+ // // https://github.com/terser-js/terser/issues/120
67
+ // inline: 2,
68
+ // },
69
+ // mangle: {
70
+ // safari10: true,
71
+ // },
72
+ // output: {
73
+ // ecma: 5,
74
+ // comments: false,
75
+ // // Turned on because emoji and regex is not minified properly using default
76
+ // // https://github.com/facebook/create-react-app/issues/2488
77
+ // ascii_only: true,
78
+ // },
79
+ // },
80
+ // }),
65
81
  new CssMinimizerPlugin({
66
82
  minimizerOptions: {
67
83
  preset: [