Last active
March 12, 2018 16:06
-
-
Save pinglinh/9dbdd0e65f5ee6e6f0fe12b52eb2879f 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 HtmlWebPackPlugin = require("html-webpack-plugin"); | |
const htmlWebpackPlugin = new HtmlWebPackPlugin({ | |
template: "./src/index.html", | |
filename: "./index.html" | |
}); | |
module.exports = { | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: { | |
loader: "babel-loader" | |
} | |
}, | |
{ | |
test: /\.css$/, | |
use: [ | |
{ | |
loader: "style-loader" | |
}, | |
{ | |
loader: "css-loader", | |
options: { | |
modules: true, | |
importLoaders: 1, | |
localIdentName: "[name]_[local]_[hash:base64]", | |
sourceMap: true, | |
minimize: true | |
} | |
} | |
] | |
} | |
] | |
}, | |
plugins: [htmlWebpackPlugin] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment