Skip to content

Lokal Webpack Plugin, works with NextJS and all webpack-based dev server.

License

Notifications You must be signed in to change notification settings

lokal-so/lokal-webpack

Repository files navigation

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

About

Lokal Webpack Plugin, works with NextJS and all webpack-based dev server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published