forked from sebastiandedeyne/v1.sebastiandedeyne.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 953 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
module.exports = {
entry: {
'css/site': './resources/assets/css/site.css',
'js/site': './resources/assets/js/site.js',
},
output: {
path: __dirname + '/public',
filename: '[name]-[hash].js',
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(['css-loader', 'postcss-loader']),
},
],
},
resolve: {
extensions: ['.js', '.css'],
},
plugins: [
new ExtractTextPlugin('[name]-[hash].css'),
new ManifestPlugin({
fileName: 'mix-manifest.json',
basePath: '/',
}),
],
};