liferay-npm-bundler-loader-babel-loader
v2.32.0
Published
A liferay-npm-bundler loader that runs Babel on source files.
Downloads
5,829
Maintainers
Keywords
Readme
liferay-npm-bundler-loader-babel-loader
A liferay-npm-bundler loader that runs Babel on source files.
Installation
npm install --save-dev liferay-npm-bundler-loader-babel-loader
Usage
In order to use this loader you must declare a rule in your module's .npmbundlerrc
file:
{
"rules": [
{
"test": "\\.js$",
"exclude": "node_modules",
"use": [
{
"loader": "babel-loader",
"options": {
"presets": ["env", "react"]
}
}
]
}
]
}
See the project's documentation for more information on how to use build rules.