Liferay NPM Bundler Source Map Tweak Plugin

2.32.2 · active · verified Sun Apr 19

liferay-npm-bundler-plugin-tweak-sourcemaps (current stable version 2.32.2) is a specialized plugin designed for the Liferay DXP frontend development ecosystem. It integrates with liferay-npm-bundler to modify and correct source map paths after the bundling process, specifically for project-owned files. This addresses common issues where build artifacts generated by the Liferay NPM Bundler might have source map references that do not correctly align with the development environment, especially when deployed within an OSGi module context. The package is part of the larger `liferay-frontend-projects` monorepo, meaning its updates and maintenance are tied to the broader Liferay frontend tooling release cycle rather than having an independent cadence. Its key differentiator is its deep integration and targeted solution for source map pathing within the Liferay DXP development workflow, focusing solely on developer-authored source files and excluding third-party dependencies.

Common errors

Warnings

Install

Imports

Quickstart

Installs the plugin as a development dependency and configures liferay-npm-bundler to use it by adding 'tweak-sourcemaps' to the plugins list in .npmbundlerrc. This example assumes a basic configuration without options.

npm install --save-dev liferay-npm-bundler-plugin-tweak-sourcemaps

// Then, add the following to your .npmbundlerrc file:
{
	"*": {
		"plugins": ["tweak-sourcemaps"]
	}
}

view raw JSON →