31 lines
624 B
JavaScript
31 lines
624 B
JavaScript
|
const webpack = require('webpack')
|
||
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||
|
|
||
|
const config = {
|
||
|
entry: ['./app.js'],
|
||
|
output: {
|
||
|
path: __dirname,
|
||
|
filename: 'build.js',
|
||
|
},
|
||
|
module: {
|
||
|
loaders: [
|
||
|
{
|
||
|
test: /\.js$/,
|
||
|
exclude: /(node_modules)/,
|
||
|
loader: 'babel-loader',
|
||
|
},
|
||
|
{
|
||
|
test: /\.scss$/,
|
||
|
use: ExtractTextPlugin.extract({
|
||
|
fallback: 'style-loader',
|
||
|
use: ['css-loader', 'sass-loader'],
|
||
|
}),
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
plugins: [new ExtractTextPlugin('output.css')],
|
||
|
devtool: 'eval',
|
||
|
}
|
||
|
|
||
|
module.exports = config
|