Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path');
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
- template: './src/index.html',
- filename: 'index.html',
- inject: 'body'
- })
- module.exports = {
- entry: './src/index.js',
- output: {
- path: path.resolve(__dirname,'./dist'),
- filename: 'bundle.js'
- },
- module: {
- rules: [
- { test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ },
- {
- test: /\.css$/,
- use: ['style-loader','css-loader']
- },
- {
- test: /\.js$/,
- exclude: /node_modules/,
- loader: "babel-loader"
- }
- ]
- },
- plugins: [HtmlWebpackPluginConfig]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement