{
	"output": "build.liferay/jar",

	"ignore": ["**/*"],
	"exclude": {
		"*": ["**/*"]
	},

	"sources": ["package.json", "build", "src.liferay"],
	"rules": [
		{
			"description": "Copy static assets",
			"test": "",
			"include": [
				"^build/static/css/.*\\.css$",
				"^build/static/media/.*"
			],
			"use": [
				{
					"loader": "copy-loader"
				}
			]
		},
		{
			"description": "Transform Liferay's source files",
			"test": "^src.liferay/.*\\.js$",
			"use": [
				{
					"loader": "babel-loader",
					"options": {
						"presets": ["babel-preset-liferay-standard"]
					}
				}
			]
		},
		{
			"description": "Transform webpack JavaScript bundles",
			"test": "^build/static/js/.*\\.js$",
			"use": [
				{
					"loader": "liferay-npm-build-support/lib/loader/wrap-webpack-bundle",
					"options": {
						"removePrefix": "build/"
					}
				},
				{
					"loader": "liferay-npm-build-support/lib/loader/replace-regexp",
					"options": {
						"pattern": "document.getElementById\\(\"root\"\\)",
						"replacement": "document.getElementById(_LIFERAY_PARAMS_.portletElementId)"
					}
				},
				{
					"loader": "liferay-npm-build-support/lib/loader/adapt-static-urls-at-runtime",
					"options": {
						"docroot": "build",
						"include": ["^static/media/.*"]
					}
				},
				{
					"loader": "liferay-npm-build-support/lib/loader/namespace-webpack",
					"options": {}
				}
			]
		},
		{
			"description": "Remove content hash from webpack bundles and CSS",
			"test": "",
			"include": [
				"^build/static/css/.*\\.css$",
				"^build/static/js/.*\\.js$"
			],
			"use": [
				{
					"loader": "liferay-npm-build-support/lib/loader/remove-webpack-hash"
				}
			]
		},
		{
			"description": "Add CSS portlet header to package.json",
			"test": "^package\\.json$",
			"use": [
				{
					"loader": "liferay-npm-build-support/lib/loader/add-css-portlet-header",
					"options": {
						"css": "/static/css/main.chunk.css"
					}
				}
			]
		}
	],

	"create-jar": {
		"output-dir": "build.liferay",
		"features": {
			"js-extender": true
		}
	}
}
