-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbaseWebpackOptions.js
33 lines (31 loc) · 1.04 KB
/
baseWebpackOptions.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
var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var embedFileSize = 65536;
var assetsLoaders = [
{test: /\.json$/, loader: 'json'},
{test: /\.mp4$/, loader: 'url?limit=' + embedFileSize + '&mimetype=video/mp4'},
{test: /\.svg.*$/, loader: 'url?limit=' + embedFileSize + '&mimetype=image/svg+xml'},
{test: /\.png$/, loader: 'url?limit=' + embedFileSize + '&mimetype=image/png'},
{test: /\.jpg$/, loader: 'url?limit=' + embedFileSize + '&mimetype=image/jpeg'},
{test: /\.gif$/, loader: 'url?limit=' + embedFileSize + '&mimetype=image/gif'},
{
test: /\.(otf|eot|ttf|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'url?limit=' + embedFileSize
}
];
module.exports = {
assetsLoaders: assetsLoaders,
preLoaders: [
{
test: /\.(js|jsx)$/,
exclude: /(node_modules|bower_components|dist|vendor)/,
loader: 'eslint-loader'
}
],
alias: {
src: path.resolve(__dirname, 'src'),
demo: path.resolve(__dirname, 'demo')
},
plugins: []
};