Skip to content

Instantly share code, notes, and snippets.

@merlox
Created February 20, 2019 18:08
Show Gist options
  • Save merlox/66d9ff44ec5d8cf4074db86aea16f810 to your computer and use it in GitHub Desktop.
Save merlox/66d9ff44ec5d8cf4074db86aea16f810 to your computer and use it in GitHub Desktop.
require('babel-polyfill')
const html = require('html-webpack-plugin')
const path = require('path')
module.exports = {
entry: ['babel-polyfill', './src/index.js'],
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}, {
test: /\.html$/,
exclude: /node_modules/,
use: {
loader: 'html-loader'
}
}, {
test: /\.css$/,
exclude: /node_modules/,
use: [
{loader: 'style-loader'},
{loader: 'css-loader'}
]
}
]
},
plugins: [
new html({
template: './src/index.ejs',
title: 'Art marketplace',
hash: true
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment