-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathwebpack.loaders.js
51 lines (49 loc) · 1.45 KB
/
webpack.loaders.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
46
47
48
49
50
51
"use strict";
let ExtractTextPlugin = require('extract-text-webpack-plugin'),
path = require('path');
module.exports = [{
test: /\.json$/,
loaders: ['json']
}, {
test: /\.(js)$/,
loader: 'babel',
exclude: [/node_modules/],
query: { compact: false }
}, {
test: /\.html$/,
exclude: [/node_modules/, /index\.html/ ],
loader: 'raw'
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style', 'css'),
include: [ /app/, /node_modules/ ]
}, {
test: /\.scss$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract('style', 'css!postcss!sass')
}, {
test: /\.ico(\?.*)?$/,
exclude: /node_modules/,
loader: 'file?name=[name].[ext]'
}, {
test: /\.(jpe?g|png|gif)$/i,
loader: 'file?hash=sha512&digest=hex&name=[name].[ext]'
}, /*{
test: /\.svg(\?.*)?$/,
loader: 'url-loader?name=[name].[ext]&limit=10000&mimetype=image/svg+xml'
},*/ {
test: /\.svg(\?.*)?$/,
loader: 'file?name=[name].[ext]'
}, {
test: /\.woff(\?.*)?$/,
loader: 'url-loader?name=[name].[ext]&limit=10000&mimetype=application/font-woff'
}, {
test: /\.woff2(\?.*)?$/,
loader: 'url-loader?name=[name].[ext]&limit=10000&mimetype=application/font-woff2'
}, {
test: /\.ttf(\?.*)?$/,
loader: 'url-loader?name=[name].[ext]&limit=10000&mimetype=application/octet-stream'
}, {
test: /\.eot(\?.*)?$/,
loader: 'url-loader?name=[name].[ext]&limit=10000&mimetype=application/vnd.ms-fontobject'
}];