liferay-lang-key-dev-loader

A Webpack loader for inlining your language keys.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
liferay-lang-key-dev-loader
601.0.34 years ago4 years agoMinified + gzip package size for liferay-lang-key-dev-loader in KB

Readme

liferay-lang-key-dev-loader
A webpack loader that will inline your Liferay Portal language keys in your source files. This is particularly useful if you are using the webpack-dev-server.

Usage

Configure the loader to be used in your development builds:
/* webpack.config.js */
module.exports = {
	devServer: {
		port: 3000,
		proxy: {
			'**': 'http://0.0.0.0:8080'
		},
	},
	devtool: 'inline-source-map',
	mode: 'development',
	module: {
		rules: [
			{
				loader: 'liferay-lang-key-dev-loader',
				test: /\.js$/
			}
		]
	},
};

Options

path

| Type | Default | | ---- | ------- | | string | src/main/resources/content/Language.properties |
The path to your Language.properties file.

regex

| Type | | ---- | | RegeExp |
The regex used to match uses of Liferay.Language.get.

LICENSE

MIT