@macaron-elements/loader-vite
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Vite Macaron loader

A Vite plugin to load Macaron files as JavaScript modules.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>
    <component-created-in-macaron></component-created-in-macaron>
    <script type="module" src="test.macaron"></script>
  </body>
</html>
import "./test.macaron";

const element = document.createElement("component-created-in-macaron");

Install

npm install @macaron-elements/loader-vite --save-dev

Setup

vite.config.js

import macaronLoader from "@macaron-elements/loader-vite";

export default defineConfig({
  plugins: [macaronLoader()],
});

Readme

Keywords

none

Package Sidebar

Install

npm i @macaron-elements/loader-vite

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

3.48 kB

Total Files

6

Last publish

Collaborators

  • seanchas116