lokal-webpack-plugin
v0.0.1
Published
Lokal SDK for Webpack (and NextJS) integration
Downloads
12
Readme
Lokal Webpack Plugin
Webpack Plugin for Lokal JS/TS client
| 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