Skip to content

Myoxocephalus/next-raw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published