Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require("path");
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- module.exports = {
- entry: "./app/index.js",
- output: {
- path: path.resolve(__dirname, "public"),
- filename: "bundle.js",
- publicPath: '/'
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- use: {
- loader: "babel-loader",
- options: { presets: ["env"] }
- }
- }
- ]
- },
- plugins: [
- new HtmlWebpackPlugin({
- filename: 'index.html',
- template: './app/index.html'
- })
- ],
- devServer: {
- historyApiFallback: true,
- contentBase: path.resolve(__dirname, 'public'),
- compress: true,
- port: 8080
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment