Skip to content

xingw-z/vite-plugin-raw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-raw

vite-plugin-raw will transform any type file to string

Install

npm install -D vite-plugin-raw

Usage

import vitePluginRaw from 'vite-plugin-raw';
const path = require('path');

module.exports = {
  plugins: [
    vitePluginRaw({
      match: /\.svg$/,
      exclude: [new RegExp(path.resolve(__dirname, './src/assets'))]
    })
  ]
}

or

import richtextRedo from '../assets/richtext_redo.svg?raw';

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published