Releases: aem-vite/import-rewriter
v9.0.0
9.0.0 (2023-11-20)
Build System
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.
v8.0.0
v7.0.0
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
.
v6.0.1
v6.0.0
v5.0.1
v5.0.0
5.0.0 (2022-02-12)
Code Refactoring
- remove css rewriter (3c5c49e)
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.