-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.base.config.js
53 lines (51 loc) · 1.59 KB
/
webpack.base.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
46
47
48
49
50
51
52
53
/* eslint-disable filenames/match-regex, import/no-commonjs, import/unambiguous */
const path = require('path');
const {environment} = require('webpack-config');
module.exports = {
module: {
loaders: [
{
test: /dashjs\/dist\/.*/,
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
},
{
test: /\.js$/,
exclude: /node_modules\/.*/,
use: ['babel-loader']
},
{
test: /\.(jpg|png)$/,
loader: 'url?limit=25000'
},
{
test: /\.svg$/,
use: ['babel-loader', 'svg-react-loader']
},
{
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader?sourceMap',
query: {
modules: true,
sourceMap: true,
importLoaders: 2,
localIdentName: environment.get('cssIdent')
}
},
'postcss-loader?sourceMap&parser=postcss-scss'
],
},
// Font Definitions
{ test: /\.svg$/, loader: 'url?limit=65000&mimetype=image/svg+xml&name=./font/[name].[ext]' },
{ test: /\.woff$/, loader: 'url?limit=65000&mimetype=application/font-woff&name=./font/[name].[ext]' },
{ test: /\.woff2$/, loader: 'url?limit=65000&mimetype=application/font-woff2&name=./font/[name].[ext]' },
{ test: /\.[ot]tf$/, loader: 'url?limit=65000&mimetype=application/octet-stream&name=./font/[name].[ext]' },
{ test: /\.eot$/, loader: 'url?limit=65000&mimetype=application/vnd.ms-fontobject&name=./font/[name].[ext]' }
]
}
};