Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

clemvnt/vite-plugin-yaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-yaml

The plugin was useful with Vite 1 but now that most of the Rollup plugins, including @rollup/plugin-yaml, are compatible with Vite 2, it is recommended to use them.

A Vite plugin for import YAML/YML files as ES6 modules.

Like @rollup/plugin-yaml but for Vite.

Install

Using npm :

npm i -D vite-plugin-yaml

Using yarn :

yarn add -D vite-plugin-yaml

Configuration

vite.config.js

module.exports = {
  plugins: [require('vite-plugin-yaml')]
}

vite.config.ts

const config = {
  plugins: [require('vite-plugin-yaml')]
}

export default config

Usage

You can now import YAML/YML files.

import object from './object.yml'

Check the playground for an example of use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •