Created
October 4, 2017 03:05
-
-
Save lsiden/c3c2803bdbeb27afdb51da6748300933 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 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