Skip to content

Latest commit

 

History

History
263 lines (131 loc) · 8.93 KB

CHANGELOG.md

File metadata and controls

263 lines (131 loc) · 8.93 KB

9.0.0 (2023-11-20)

Build System

  • drop native CJS support (5b7f4fc)
  • increase minimum node and vite versions (d3b0294)

BREAKING CHANGES

  • no longer support CJS

Vite 5 deprecates CJS support and as such support has been dropped here

  • bump min node and vite versions

Node v18/20 and Vite v5+ are required moving forward.

8.0.0 (2023-07-14)

Build System

  • increase minimum node and vite versions (2d71162)

BREAKING CHANGES

  • bump min node and vite versions

Node v16 and Vite v3.0.0 are required moving forward.

7.0.0 (2022-11-30)

Features

  • support multiple key formats for acs commons (4fe9015)

BREAKING CHANGES

  • Change default keyFormat handling

ACS Commons ships with two different ClientLib path formats. This change introduces support for both. Use acs-modern for instances where your ClientLibs contain ACSHASH and acs-classic when only the MD5 hash exists. For AEMaaCS please ensure you use cloud.

6.0.1 (2022-07-29)

Bug Fixes

  • resolve incorect dynamic import paths (7fc8f92)

6.0.0 (2022-07-02)

Build System

  • increase minimum node version (572b261)

BREAKING CHANGES

  • Increment minimum required node version to v14

As Node v12 is no longer supported we are bringing our minimum supported version of node to v14. Please ensure your project is up to date.

5.0.1 (2022-05-26)

Bug Fixes

  • resolve incorrect plugin instance type (9ebc985)

5.0.0 (2022-02-12)

Code Refactoring

Features

  • redesign imports handler (7b1ac3b)

BREAKING CHANGES

  • Complete redesign of the dynamic/native imports handler

The previous implementation was kind of clunky and didn't behave correct in most situations. A new resourcesPath configuration exists in the bundles rewriter which enforces a strict contract between the handler and your configuration, removing all assumptions.

Please refer to the below for how you should optimally setup your Vite configuration.

{
  base: command === 'build' ? '/etc.clientlibs/<project>/clientlibs/<clientlib>/' : '/',

  build: {
    rollupOptions: {
      output: {
        chunkFileNames: '<clientlib>/resources/js/chunks/[name].js',
        entryFileNames: '<clientlib>/resources/js/[name].js',
      },
    },
  },

  plugins: [
    bundlesImportRewriter({
      publicPath: '/etc.clientlibs/<project>/clientlibs/<clientlib>',
      resourcesPath: 'resources/js',
    }),
  ],
}
  • Vite 2.6.x and greater is now required

To keep up with internal fixes and feature additions Vite 2.6.x or greater is required to support server.origin which removes the need for the CSS Rewriter.

4.1.3 (2022-01-20)

Bug Fixes

  • resolve AEM import path (bca085c)

4.1.2 (2022-01-19)

Bug Fixes

  • resolve entry file import dependency paths (dda6521)

4.1.1 (2022-01-19)

Bug Fixes

  • resolve import paths with caching enabled (f5c2a35)

4.1.0 (2021-12-29)

Bug Fixes

  • ensure css bundles aren't omitted (3a5fc78)

Features

  • restore dynamic import support (b1490d5)

BREAKING CHANGES

  • The default export has been replaced with a named export
  • The aemViteCSSImportRewriter export has been renamed to cssImportRewriter

To better align with community standards, the default export has been changed to a named export called bundlesImportRewriter.

4.0.0 (2021-12-28)

Bug Fixes

  • resolve import transformation (05df22b)
  • resolve sourcemap warning during builds (9a7e0c1)

BREAKING CHANGES

  • Dynamic imports are no longer rewritten

Please ensure that the base path in your Vite configuration matches your ClientLib proxy path as Vite will automatically prefix imports using it.

3.0.1 (2021-09-21)

Bug Fixes

  • ensure JSX extensions are captured (19ebb6c)

3.0.0 (2021-07-14)

Code Refactoring

Features

  • added static asset rewriter for css (9068bcc)

BREAKING CHANGES

  • Removed command option in favour of plugin enforcement

To reduce any future complexity, you can define when the ES import rewriter will be executed. This can be done as shown in the below example by setting the apply option to either build or serve.

Ensure that enforce is always set to pre as it will prevent Vite from transforming things first.

plugins: [
  {
    ...aemViteImportRewriter({ /* ... */ }),

    apply: 'build',
    enforce: 'pre',
  },
]

2.0.0 (2021-06-13)

Features

  • automatic path rewiting with cache support (4054ff3)
  • resolve import entry path for AEM (8d51559)

BREAKING CHANGES

  • Main entry points are now rewritten

All instances of the main entry point that need to refer back to the AEM ClientLib are automatically rewritten

1.2.1 (2021-05-18)

Bug Fixes

  • ensure chunk paths are mapped correctly (7daf43b)
  • dev: corrected plugin name (a30cd79)

1.2.0 (2021-05-17)

Bug Fixes

Features

  • added support for native imports (65a0e1b)

1.1.2 (2021-05-04)

Bug Fixes

  • fixed lib output not using commonjs (e42428e)

1.1.1 (2021-05-01)

Bug Fixes

  • resolved missing files in npm package (378e9fc)