//vite.config.ts
import { defineConfig } from "vite";
import { vitePlugin as malinaPlugin } from "malinajs-unplugin";
export default defineConfig(({ mode }) => ({
plugins: [
malinaPlugin({
debugLabel: mode === "development",
}),
],
}));
//webpack.config.js
const { webpackPlugin: malinaPlugin } = require("malinajs-unplugin");
module.exports = {
plugins: [malinaPlugin()],
};
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