1.0.0 • Published 4 years ago

next-raw v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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>