next-raw

1.0.0 • Public • Published

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>

Readme

Keywords

Package Sidebar

Install

npm i next-raw

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

1.49 kB

Total Files

3

Last publish

Collaborators

  • myoxocephalus