Socket
Socket
Sign inDemoInstall

@aem-vite/import-rewriter

Package Overview
Dependencies
184
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2Next

9.0.0

Diff

c.shaw
published 8.0.0 •

Changelog

Source

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.

c.shaw
published 7.0.0 •

Changelog

Source

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.

c.shaw
published 6.0.1 •

Changelog

Source

6.0.1 (2022-07-29)

Bug Fixes

  • resolve incorect dynamic import paths (7fc8f92)
c.shaw
published 6.0.0 •

Changelog

Source

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.

c.shaw
published 5.0.1 •

Changelog

Source

5.0.1 (2022-05-26)

Bug Fixes

  • resolve incorrect plugin instance type (9ebc985)
c.shaw
published 5.0.0 •

Changelog

Source

5.0.0 (2022-02-12)

Code Refactoring

Features

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.

c.shaw
published 4.1.3 •

Changelog

Source

4.1.3 (2022-01-20)

Bug Fixes

c.shaw
published 4.1.2 •

Changelog

Source

4.1.2 (2022-01-19)

Bug Fixes

  • resolve entry file import dependency paths (dda6521)
c.shaw
published 4.1.1 •

Changelog

Source

4.1.1 (2022-01-19)

Bug Fixes

  • resolve import paths with caching enabled (f5c2a35)
2Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc