{"id":18951,"library":"aem-sync-webpack-plugin","title":"aem-sync-webpack-plugin","description":"Webpack plugin that integrates with AEMSync to automatically upload files to Adobe Experience Manager (AEM) after manual changes or webpack build completion. Version 0.1.3 is the latest stable release, with no active development since 2016. It is a thin wrapper around the aemsync library and requires AEMSync to be installed separately. The plugin only triggers in webpack watch mode, making it ideal for local development workflows. Compared to other AEM upload plugins, it leverages the efficient aemsync delta-based sync mechanism.","status":"maintenance","version":"0.1.3","language":"javascript","source_language":"en","source_url":"https://github.com/lukaszblasz/aem-sync-webpack-plugin","tags":["javascript"],"install":[{"cmd":"npm install aem-sync-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add aem-sync-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add aem-sync-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for syncing files to AEM; the plugin relies on aemsync's API.","package":"aemsync","optional":false}],"imports":[{"note":"Plugin is CJS-only; ESM import is not supported.","wrong":"import AemSyncPlugin from 'aem-sync-webpack-plugin';","symbol":"AemSyncPlugin","correct":"const AemSyncPlugin = require('aem-sync-webpack-plugin');"},{"note":"Must use the 'new' keyword to instantiate the plugin.","wrong":"plugins: [AemSyncPlugin({...})]","symbol":"AemSyncPlugin","correct":"plugins: [new AemSyncPlugin({...})]"},{"note":"Targets must be an array of strings, even if only one target.","wrong":"targets: 'http://admin:admin@localhost:4502'","symbol":"options.targets","correct":"targets: ['http://admin:admin@localhost:4502']"}],"quickstart":{"code":"// webpack.config.js\nconst AemSyncPlugin = require('aem-sync-webpack-plugin');\n\nmodule.exports = {\n  // ...webpack config\n  plugins: [\n    new AemSyncPlugin({\n      targets: [\n        'http://admin:admin@localhost:4502'\n      ],\n      watchDir: './dist',\n      exclude: '**/node_modules/**',\n      pushInterval: 1000\n    })\n  ]\n};\n\n// Run: webpack --watch","lang":"javascript","description":"Configures the AemSyncPlugin in webpack.config.js to upload files to AEM on changes when running webpack --watch."},"warnings":[{"fix":"Ensure webpack is run with the --watch flag, e.g., webpack --watch.","message":"Plugin only works in webpack watch mode; does nothing during a regular build (webpack without --watch).","severity":"gotcha","affected_versions":"all"},{"fix":"Include credentials in the target URL: http://username:password@host:port.","message":"Target URLs must include credentials (e.g., admin:admin) otherwise authentication fails silently.","severity":"gotcha","affected_versions":"all"},{"fix":"Set exclude to a glob pattern like '**/node_modules/**' to exclude node_modules from sync.","message":"The exclude glob pattern is applied relative to watchDir; incorrect patterns may cause node_modules to be uploaded.","severity":"gotcha","affected_versions":"all"},{"fix":"Run npm install aemsync --save-dev to ensure aemsync is available.","message":"The aemsync library must be installed separately; it is not a dependency of this plugin.","severity":"breaking","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install aemsync: npm install aemsync --save-dev","cause":"aemsync is not installed or not in node_modules.","error":"Cannot find module 'aemsync'"},{"fix":"Ensure targets is an array, e.g., targets: ['http://admin:admin@localhost:4502']","cause":"targets option is not an array.","error":"TypeError: targets is not iterable"},{"fix":"Use 'new AemSyncPlugin({...})' instead of 'AemSyncPlugin({...})'","cause":"Missing 'new' keyword when instantiating the plugin.","error":"AemSyncPlugin is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}