snowpack-plugin-raw-file-loader

1.0.9 • Public • Published

snowpack-plugin-raw-file-loader

This tiny Snowpack plugin will stringify wanted files so they can be loaded as modules. For example .md, .svg etc.

snowpack.config.js

module.exports = {
  plugins: [
    ["snowpack-plugin-raw-file-loader", {
      exts: [".txt", ".md", ".svg", ...], // Add file extensions saying what files should be loaded as strings in your snowpack application. Default: '.txt'
    }],
  ],
}

Usage

 
import someMarkdown from './some-path/some-markdown'
 
...
 

Package Sidebar

Install

npm i snowpack-plugin-raw-file-loader

Weekly Downloads

25

Version

1.0.9

License

ISC

Unpacked Size

2.14 kB

Total Files

3

Last publish

Collaborators

  • akejolin