Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 833 Bytes

README.md

File metadata and controls

43 lines (32 loc) · 833 Bytes

Lokal Webpack Plugin

Webpack Plugin for Lokal JS/TS client

CLI Preview Browser Preview
CLI Preview Browser 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