next-raw
v1.0.0
Published
Import files as string in [Next.js]
Downloads
2
Readme
Next.js + raw files
Import files as string in Next.js
Installation
npm install --save next-raw
or
yarn add next-raw
Usage
Create a next.config.js
in your project
// next.config.js
const withRaw = require('next-raw')
module.exports = withRaw()
In your component
import txt from './my-file.txt'
export default () => <div>
<p>{txt}</p>
</div>