@macaron-elements/loader-vite
v0.3.0
Published
Vite plugin to load Macaron files
Downloads
1
Readme
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()],
});