https://github.com/jiripudil/neon-loader
Neon loader for webpack
https://github.com/jiripudil/neon-loader
neon webpack webpack-loader
Last synced: 3 months ago
JSON representation
Neon loader for webpack
- Host: GitHub
- URL: https://github.com/jiripudil/neon-loader
- Owner: jiripudil
- License: mit
- Created: 2017-03-18T08:37:10.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-18T08:45:08.000Z (about 8 years ago)
- Last Synced: 2025-02-28T22:49:53.627Z (4 months ago)
- Topics: neon, webpack, webpack-loader
- Language: JavaScript
- Size: 3.91 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# neon-loader for webpack
[](https://npmjs.com/package/neon-loader)
[](https://npmjs.com/package/neon-loader)
[](https://npmjs.com/package/neon-loader)[Neon](https://ne-on.org/) loader for [webpack](https://webpack.github.io/) using David Matějka's [neon-js](https://github.com/matej21/neon-js).
## Installation
```sh
npm install neon-loader
```## Usage
### Configuration
```js
module.exports = {
module: {
rules: [
{
test: /\.neon$/,
use: 'neon-loader'
}
]
}
}
``````js
import config from 'config.neon';
```### CLI
```sh
webpack --module-bind 'neon=neon-loader'
``````js
import config from 'config.neon';
```### Inline
```js
import config from 'neon-loader!config.neon');
```## Options
### `forceObject`
By default, `neon-js` detects if the loaded file contains a list and returns a JS array if so. You can use this option to force 'neon-js' to transform lists into objects:
```js
import listObject from 'neon-loader?forceObject!list.neon';
```## License
MIT (http://www.opensource.org/licenses/mit-license.php)