9.0.0 (2023-11-20)
- 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)
- increase minimum node and vite versions (2d71162)
- bump min node and vite versions
Node v16 and Vite v3.0.0 are required moving forward.
7.0.0 (2022-11-30)
- support multiple key formats for acs commons (4fe9015)
- 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)
- resolve incorect dynamic import paths (7fc8f92)
6.0.0 (2022-07-02)
- increase minimum node version (572b261)
- 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)
- resolve incorrect plugin instance type (9ebc985)
5.0.0 (2022-02-12)
- remove css rewriter (3c5c49e)
- redesign imports handler (7b1ac3b)
- 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)
- resolve AEM import path (bca085c)
4.1.2 (2022-01-19)
- resolve entry file import dependency paths (dda6521)
4.1.1 (2022-01-19)
- resolve import paths with caching enabled (f5c2a35)
4.1.0 (2021-12-29)
- ensure css bundles aren't omitted (3a5fc78)
- restore dynamic import support (b1490d5)
- The default export has been replaced with a named export
- The
aemViteCSSImportRewriter
export has been renamed tocssImportRewriter
To better align with community standards, the default export has been changed to a named export called bundlesImportRewriter
.
4.0.0 (2021-12-28)
- 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)
- ensure JSX extensions are captured (19ebb6c)
3.0.0 (2021-07-14)
- removed
command
option (e5085f8)
- added static asset rewriter for css (9068bcc)
- 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)
- 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)
1.2.0 (2021-05-17)
- corrected faqs link (d20e2e9)
- added support for native imports (65a0e1b)
1.1.2 (2021-05-04)
- fixed lib output not using commonjs (e42428e)
1.1.1 (2021-05-01)
- resolved missing files in npm package (378e9fc)