-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwebpack.config.v1.js
52 lines (52 loc) · 1.14 KB
/
webpack.config.v1.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
const path = require('path');
module.exports = {
entry: path.join(__dirname, 'qrp_WebApp', 'src', 'app'),
output: {
filename: 'QRPortal.js',
path: path.resolve(__dirname, 'qrp_WebApp')
},
module: {
rules: [{
test: /.js?$/,
include: [
path.resolve(__dirname, 'qrp_WebApp', 'src')
],
exclude: [
path.resolve(__dirname, 'node_modules'),
path.resolve(__dirname, 'bower_components')
],
loader: 'babel-loader',
query: {
presets: ['es2015','react'],
plugins: ['react-html-attrs',
'transform-class-properties',
'transform-decorators-legacy',
'transform-react-jsx']
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
},
{
test: /\.svg$/,
loader: 'svg-inline-loader'
}]
},
resolve: {
modules: [
path.resolve('./node_modules'),
path.resolve('./public/src')
],
extensions: ['.json', '.js', '.jsx', '.css']
},
devtool: 'source-map'
};