UNPKG

bs-websocket

Version:
36 lines (35 loc) 833 B
const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { target: 'web', mode: 'development', context: __dirname, entry: { app: [ 'webpack-dev-server/client?http://localhost:8000', 'webpack/hot/only-dev-server', './lib/js/example/Web.bs.js' ], }, output: { path: path.resolve(__dirname, 'public'), filename: 'bundle.js', publicPath: 'http://localhost:8000/' }, plugins: [ new webpack.NamedModulesPlugin(), new webpack.HotModuleReplacementPlugin(), new HtmlWebpackPlugin({ template: path.join(__dirname, 'template/index.html'), }), ], devServer: { port: 8000, hot: true, inline: true, headers: { 'Access-Control-Allow-Origin': '*', } } };