craco-twig-loader
v1.0.0
Published
A twig loader plugin for craco / react-scripts / create-react-app
Readme
Craco Twig-Loader Plugin
This is a craco plugin that adds twig-loader to create-react-app version >= 2.
Installation
First, follow the craco Installation Instructions to install the craco package, create a craco.config.js file, and modify the scripts in your package.json.
Then install craco-twig-loader:
$ yarn add craco-twig-loader
# OR
$ npm i -S craco-twig-loaderUsage
Here is a complete craco.config.js configuration file that adds raw-loader to create-react-app:
const CracoTwigLoaderPlugin = require("craco-twig-loader");
module.exports = {
plugins: [{ plugin: CracoTwigLoaderPlugin }]
};Inspiration
This is heavily borrowed from @baristalabs/craco-raw-loader
