malinajs-unplugin
v0.2.2
Published
Transform Malina.js files to plain js
Downloads
140
Maintainers
Readme
malinajs-unplugin
Usage
Vite
//vite.config.ts
import { defineConfig } from "vite";
import { vitePlugin as malinaPlugin } from "malinajs-unplugin";
export default defineConfig(({ mode }) => ({
plugins: [
malinaPlugin({
debugLabel: mode === "development",
}),
],
}));
Webpack
//webpack.config.js
const { webpackPlugin: malinaPlugin } = require("malinajs-unplugin");
module.exports = {
plugins: [malinaPlugin()],
};
Caution
Be careful when using with Vite: the html
extension will not work
As stated in the malinajs documentation, you can import 'malinajs' as 'malinajs/runtime'. Using unplugin, you cannot do this. Read more in the issue