Skip to content

Instantly share code, notes, and snippets.

@lsiden
Created October 4, 2017 03:05
Show Gist options
  • Save lsiden/c3c2803bdbeb27afdb51da6748300933 to your computer and use it in GitHub Desktop.
Save lsiden/c3c2803bdbeb27afdb51da6748300933 to your computer and use it in GitHub Desktop.
const path = require('path')
module.exports = {
target: 'web',
entry: {
app: ['./demo/index.jsx']
},
devServer: {
contentBase: './demo/',
},
devtool: "eval-source-map",
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: 'dist'
},
resolve: {
extensions: ['.js', '.jsx', '.json']
},
module: {
rules: [
{
test: /\.js[x]?$/,
include: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'demo'),
],
use: {
loader: 'babel-loader',
},
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.(png|jpg|svg|ttf|eot|woff|woff2)$/,
use: ['file-loader'],
},
],
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment