-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.base.js
79 lines (79 loc) · 1.92 KB
/
webpack.config.base.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const path = require('path');
module.exports = {
entry: './client/App/app.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'app/public/local'),
},
module: {
rules: [{
test: /.jsx?$/,
include: [
path.resolve(__dirname, 'client'),
],
exclude: [
path.resolve(__dirname, 'node_modules'),
path.resolve(__dirname, 'bower_components'),
],
use: [
{
loader: 'babel-loader',
options: {
presets: ['es2015', 'react', 'stage-0'],
plugins: [
'transform-decorators-legacy',
'transform-class-properties'
],
},
},
{
loader: 'eslint-loader',
},
],
}, {
test: /.css?$/,
use: [
'style-loader',
'css-loader',
],
}, {
test: /.less?$/,
include: [
path.resolve(__dirname, 'client'),
],
exclude: [
path.resolve(__dirname, 'node_modules'),
path.resolve(__dirname, 'bower_components'),
],
use: [
'style-loader',
'css-loader',
'less-loader',
],
}, {
test: /\.(gif|png|jpe?g|svg)$/i,
use: [
'url-loader',
]
}, {
test: /\.ttf$/i,
use: [
'url-loader',
],
}],
},
plugins: [],
resolve: {
extensions: ['.json', '.js', '.jsx', '.css', '.less'],
alias: {
$containers: path.resolve(__dirname, './client/App/containers'),
$components: path.resolve(__dirname, './client/App/components'),
$actions: path.resolve(__dirname, './client/App/actions'),
$stores: path.resolve(__dirname, './client/App/stores'),
$config: path.resolve(__dirname, './client/App/config'),
$styles: path.resolve(__dirname, './client/App/styles'),
$utils: path.resolve(__dirname, './client/App/utils'),
},
},
devtool: 'source-map',
}