https://github.com/asynched/webpack-fugly-loader
A webpack loader for the fugly templating language.
https://github.com/asynched/webpack-fugly-loader
fugly loader webpack
Last synced: about 2 months ago
JSON representation
A webpack loader for the fugly templating language.
- Host: GitHub
- URL: https://github.com/asynched/webpack-fugly-loader
- Owner: asynched
- Created: 2022-06-01T00:57:15.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-01T00:57:45.000Z (about 4 years ago)
- Last Synced: 2025-10-05T18:09:38.528Z (9 months ago)
- Topics: fugly, loader, webpack
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webpack-fugly-loader
A webpack loader for the Fugly templating language.
## About
This webpack loader allows you to use the fugly templating language inside of webpack, and it will compile the template into a JavaScript module. This makes it possible to import `.fugly` files inside your project.
## Usage
### Requirements
- NodeJS
- Webpack
### How to install?
Clone this repository and add this loader to your webpack configuration.
```js
// webpack.config.js
const path = require('path')
module.exports = {
// ...
module: {
rules: [
{
test: /\.fugly$/,
use: [
{
loader: path.join(
__dirname,
'webpack-fugly-loader',
'src',
'loader.js'
),
},
],
},
],
},
}
```
This will make it possible to import fugly files as follows:
```js
import MyTemplate from './templates/my-template.fugly'
const html = MyTemplate({
// ...
})
```