-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
45 lines (43 loc) · 983 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
37
38
39
40
41
42
43
44
45
'use strict';
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: ["./src/pages/home/client.js"],
output: {
path: __dirname,
filename: "static/bundle.js"
},
resolve: {
extensions: ['.js', '.marko'],
},
module: {
loaders: [{
test: /\.marko$/,
loader: 'marko-loader'
},
{
test: /\.(less|css)$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
loader: ['css-loader', 'less-loader']
})
},
{
test: /\.svg/,
loader: 'svg-url-loader'
},
{
test: /\.(jpg|jpeg|gif|png)$/,
loader: 'file',
query: {
name: 'static/images/[hash].[ext]',
publicPath: '/'
}
}
]
},
plugins: [
// Write out CSS bundle to its own file:
new ExtractTextPlugin({ allChunks: true, filename: 'static/bundle.css' })
]
};