webpack-plugin-localtunnel

Simple plugin to allow you to expose your [`webpack-dev-server`](https://webpack.js.org/configuration/dev-server/) over the internet using [`localtunnel`](https://localtunnel.github.io/www/)

Usage no npm install needed!

<script type="module">
  import webpackPluginLocaltunnel from 'https://cdn.skypack.dev/webpack-plugin-localtunnel';
</script>

README

Webpack plugin localtunnel

Simple plugin to allow you to expose your webpack-dev-server over the internet using localtunnel

Installation

yarn add -D webpack-plugin-localtunnel

or

npm install -D webpack-plugin-localtunnel

Usage

const LocaltunnelPlugin = require('webpack-plugin-localtunnel')

module.exports = {
  devServer: {
    public: `${subdomain}.loca.lt`,
  },
  plugins: [new LocaltunnelPlugin({subdomain: 'my-subdomain'})],
}

Options

name type notes
subdomain string Used to create a custom URL <subdomian>.loca.it otherwise a random subdomain will be assigned
port number The port that localtunnel needs to listen to. By default the plugin will pick up the webpack-dev-server port unless otherwise specified

Both options are optional, but subdomain is recommended to be set so you have a consistent URL