Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khaliqgant/craco-twig-loader
A twig-loader plugin for craco / react-scripts / create-react-app
https://github.com/khaliqgant/craco-twig-loader
Last synced: 4 days ago
JSON representation
A twig-loader plugin for craco / react-scripts / create-react-app
- Host: GitHub
- URL: https://github.com/khaliqgant/craco-twig-loader
- Owner: khaliqgant
- Created: 2021-04-15T13:09:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-15T13:10:48.000Z (over 3 years ago)
- Last Synced: 2024-12-12T13:18:11.152Z (29 days ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Craco Twig-Loader Plugin
This is a [craco](https://github.com/sharegate/craco) plugin that adds [twig-loader](https://github.com/zimmo-be/twig-loader) to [create-react-app](https://facebook.github.io/create-react-app/) version >= 2.
## Installation
First, follow the [`craco` Installation Instructions](https://github.com/sharegate/craco/blob/master/packages/craco/README.md##installation) to install the `craco` package, create a `craco.config.js` file, and modify the scripts in your `package.json`.
Then install `craco-twig-loader`:
```bash
$ yarn add craco-twig-loader# OR
$ npm i -S craco-twig-loader
```## Usage
Here is a complete `craco.config.js` configuration file that adds raw-loader to `create-react-app`:
```js
const CracoTwigLoaderPlugin = require("craco-twig-loader");module.exports = {
plugins: [{ plugin: CracoTwigLoaderPlugin }]
};
```
## InspirationThis is heavily borrowed from [@baristalabs/craco-raw-loader](https://github.com/BaristaLabs/craco-raw-loader)
## License
[MIT](./LICENSE)