-
-
Save BTMPL/e56cc2df3fefd13d02c4d769468b337d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment