ahmedelgabri / webpack-plugin-localtunnel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

License:MIT License


Languages

Language:JavaScript 96.4%Language:Shell 3.6%