0.0.1 • Published 11 months ago

lokal-webpack-plugin v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Lokal Webpack Plugin

Webpack Plugin for Lokal JS/TS client

CLI PreviewBrowser Preview
CLI PreviewBrowser Preview

Installation

npm i lokal-webpack-plugin

Usage

// next.config.mjs
import lokalTunnel from 'lokal-webpack-plugin';

/** @type {import('next').NextConfig} */
const nextConfig = {
	reactStrictMode: true,

	webpack: (config, { dev, isServer }) => {
		if (dev && !isServer) {
			config.plugins.push(
				new lokalTunnel({
					lanAddress: 'next.local',
					publicAddress: 'next.i.lokal-so.site' // Optional: custom public address
				})
			);
		}
		return config;
	}
};

export default nextConfig;

License

MIT

0.0.1

11 months ago