Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path');
- var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
- module.exports = {
- entry: { main: './src/index.js' },
- output: {
- path: path.resolve(__dirname, 'dist'),
- filename: 'main.js'
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- exclude: /node_modules/,
- use: {
- loader: "babel-loader"
- }
- }
- ]
- },
- watch: true,
- plugins: [
- new BrowserSyncPlugin({
- host: process.env.IP || 'localhost',
- port: process.env.PORT || 3000,
- server: {
- baseDir: ['./', './build']
- }
- })
- ]
- }
Add Comment
Please, Sign In to add comment