Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lyra/webpack-properties-loader
Webpack loader for .properties files.
https://github.com/lyra/webpack-properties-loader
Last synced: 12 days ago
JSON representation
Webpack loader for .properties files.
- Host: GitHub
- URL: https://github.com/lyra/webpack-properties-loader
- Owner: lyra
- License: mit
- Created: 2021-05-25T12:54:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-27T08:28:25.000Z (over 3 years ago)
- Last Synced: 2024-10-28T09:20:53.040Z (19 days ago)
- Language: JavaScript
- Size: 74.2 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @lyracom/properties-loader
> Webpack loader for .properties files, based on the [properties](https://www.npmjs.com/package/properties) package.
[![npm (scoped)](https://img.shields.io/npm/v/@lyracom/properties-loader)](https://www.npmjs.com/package/@lyracom/properties-loader)
## Installation
```sh
yarn add -D @lyracom/properties-loader
```or
```sh
npm install -D @lyracom/properties-loader
```## Usage
### Webpack configuration
```js
module.exports = {
module: {
rules: [
{
test: /\.properties$/,
loader: '@lyracom/properties-loader',
options: {
namespaces: true,
sections: true,
// other properties.parse options...
},
},
],
},
}
```### Webpack inline
```js
import strings from '!@lyracom/properties-loader?namespaces§ions!./strings.properties'
```Options can be passed with a query parameter, e.g. `?namespaces§ions=false`, or a JSON object, e.g. `?{"namespaces":true,"sections":false}`.
More info here: https://webpack.js.org/concepts/loaders/#inline