Skip to content

v0.68.0

Compare
Choose a tag to compare
@swagger-bot swagger-bot released this 16 Feb 15:08
· 1849 commits to main since this release

0.68.0 (2023-02-16)

Features

  • ast: add sideEffects field to package.json (c2d8104), closes #2566
  • core: add sideEffects field to package.json (27a6eb5), closes #2566
  • json-path: add sideEffects field to package.json (1e6e75b), closes #2566
  • json-pointer: add sideEffects field to package.json (85d32e9), closes #2566
  • ns-api-design-systems: add sideEffects field to package.json (24c0fe3), closes #2566
  • ns-asyncapi-2: add sideEffects field to package.json (6f740a3), closes #2566
  • ns-json-schema-draft-4: add sideEffects field to package.json (3b52219), closes #2566
  • ns-json-schema-draft-6: add sideEffects field to package.json (aef6a49), closes #2566
  • ns-json-schema-draft-7: add sideEffects field to package.json (e9706ab), closes #2566
  • ns-openapi-3-0: add sideEffects field to package.json (6dae3e0), closes #2566
  • ns-openapi-3-1: add sideEffects field to package.json (585e0b6), closes #2566
  • ns-workflows-1: add sideEffects field to package.json (faf7be0), closes #2566
  • parser-adapter-ads-json: add sideEffects field to package.json (178a40e), closes #2566
  • parser-adapter-ads-yaml: add sideEffects field to package.json (88c760a), closes #2566
  • parser-adapter-json: add sideEffects field to package.json (04283c4), closes #2566
  • parser-adapter-yaml-1-2: add sideEffects field to package.json (8e27614), closes #2566
  • parser-asyncapi-json-2: add sideEffects field to package.json (c4908fc), closes #2566
  • parser-asyncapi-yaml-2: add sideEffects field to package.json (a4e0e29), closes #2566
  • parser-openapi-json-3-0: add sideEffects field to package.json (7045c7b), closes #2566
  • parser-openapi-json-3-1: add sideEffects field to package.json (a5c9081), closes #2566
  • parser-openapi-yaml-3-0: add sideEffects field to package.json (d341d99), closes #2566
  • parser-openapi-yaml-3-1: add sideEffects field to package.json (d8d0895), closes #2566
  • parser: add sideEffects field to package.json (3370121), closes #2566

The key to properly tree-shake ApiDOM imports is to:

{
  mode: 'production', // drops "dead code" from the bundle by setting proper defaults to `optimization` config
  optimization: {
    sideEffects: true, // tells webpack to recognise the sideEffects flag in package.json, ramda is side effects free
    minimize: true, // needs to be set to `true` for proper tree-shaking
    providedExports: true, // if set to `true` it gives far better results
    usedExports: true, // needs to be set to `true` for proper tree-shaking
    concatenateModules: true, // needs to be set to `true` for proper tree-shaking
  }
}