https://github.com/kantord/emuto-loader
https://github.com/kantord/emuto-loader
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kantord/emuto-loader
- Owner: kantord
- License: mit
- Created: 2018-10-12T18:11:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:51:58.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T15:00:33.668Z (over 1 year ago)
- Language: JavaScript
- Size: 143 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# emuto-loader
An [emuto](https://kantord.github.io/emuto/) loader for webpack.
## Setup
You need to install emuto and emuto-loader:
*Using yarn*
```
yarn add --dev emuto emuto-loader
```*Using npm*
```
npm install --save-dev emuto emuto-loader
```You need to modify your webpack config:
``` javascript
// webpack.config.js
module.exports = {
...
module: {
rules: [{
test: /\.eq$/,
loader: 'emuto-loader' // compiles emuto to JavaScript
}]
}
};
```You'll now be able to import emuto scripts:
```javascript
// index.js
import GreetUser from './greeting.eq'console.log(GreetUser({user: "John"}))
```