Skip to content

This is a craco plugin that makes it easy to use the webpack raw-loader with create-react-app version >= 2.

License

Notifications You must be signed in to change notification settings

melMass/craco-raw-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

⚠️ The status of Craco is uncertain, this still works for older CRA versions. But starting with v5 you can use Asset Modules

Craco Raw Plugin

MIT License

This is a craco plugin that makes it easy to use the webpack raw-loader with create-react-app version >= 2.

Installation

$ yarn add -D craco-raw-loader

# OR

$ npm install craco-raw-loader --save-dev

Basic Usage

craco-raw-loader expect a test option containing your regex selector.

Here is a simple craco.config.js example for frag (OpenGL Fragment Shader) files:

const rawLoader = require('craco-raw-loader')

module.exports = {
    plugins: [
     { 
       plugin: rawLoader,
       options: { test: /\.frag$/ }
     }
}

About

This is a craco plugin that makes it easy to use the webpack raw-loader with create-react-app version >= 2.

Resources

License

Stars

Watchers

Forks

Packages

No packages published