Created
October 6, 2018 02:06
-
-
Save jogeshpi03/044621b276af94d23670f72b1ac8dc6d to your computer and use it in GitHub Desktop.
This file contains hidden or 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"); | |
module.exports = { | |
entry: "./src/index.js", | |
output: { | |
path: path.join(__dirname, "/dist"), | |
filename: "index-bundle.js" | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: ["babel-loader"] | |
}, | |
{ | |
test: /\.css$/, | |
use: ["style-loader", "css-loader"] | |
} | |
] | |
}, | |
plugins: [ | |
new HtmlWebpackPlugin({ | |
template: "./src/index.html" | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment