Created
January 10, 2019 08:45
-
-
Save buglessir/3a920851dac73f8487b9846f2cad811c 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
var path = require('path'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ | |
template: path.resolve(__dirname, 'src/index.html') | |
}); | |
module.exports = { | |
entry: path.resolve(__dirname, 'src/index.js'), | |
output: { | |
filename: 'bundle.js', | |
path: path.resolve(__dirname, 'build') | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.(js|jsx)$/, | |
use: 'babel-loader', | |
exclude: /node_modules/ | |
}, | |
{ | |
test: /\.scss$/, | |
use: ['style-loader', 'css-loader', 'sass-loader'] | |
} | |
] | |
}, | |
plugins: [HtmlWebpackPluginConfig] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment