Simple plugin to allow you to expose your
webpack-dev-server
over
the internet using localtunnel
yarn add -D webpack-plugin-localtunnel
or
npm install -D webpack-plugin-localtunnel
const LocaltunnelPlugin = require('webpack-plugin-localtunnel')
module.exports = {
devServer: {
public: `${subdomain}.loca.lt`,
},
plugins: [new LocaltunnelPlugin({subdomain: 'my-subdomain'})],
}
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