This repository has been archived by the owner on Jan 30, 2021. It is now read-only.
forked from ilgilenio/Otag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
78 lines (73 loc) · 2.13 KB
/
webpack.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
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
var path = require('path')
var webpack = require('webpack')
function resolve(dir) {
return path.join(__dirname, './', dir)
}
let banner = `
██████████ 2017 - 2018 ⊕ Otag `+require('./package.json').version+`
█████ █████
████ ██ ████
███ ██ ███ .88888. dP 88b
██ ██ d8' \`8b 88
██ █████ ██ █████ ██ 88 88 d8888P .d8888b. .d8888b.
██ ██ 88 88 88 88' \`88 88' \`88
███ ██ ███ Y8. .8P 88 88. .88 88. .88
████ ██ ████ \`8888P' \`888 \`88888P8 \`8888P88
█████ █████ .88
██████████ d8888P
`
module.exports = {
entry: './www/uygulama.js',
output: {
path: path.resolve(__dirname, './www/yay'),
publicPath: './www/yay',
filename: 'uygu.js'
},
plugins: [
new webpack.BannerPlugin(banner)
],
resolve: {
alias: {
'₺': resolve('/'),
'@': resolve('/bet/')
},
extensions: ['*', '.js', '.odn', '.json']
},
devServer: {
historyApiFallback: true,
overlay: true,
inline:true
},
performance: false,
devtool: '#eval-source-map'
}
if (process.env.NODE_ENV === 'production') {
let plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
Object.assign(module.exports, {
optimization: {
minimizer: [
new UglifyJsPlugin({
cache: true,
sourceMap: true,
uglifyOptions: {
mangle: true,
ecma: 6,
compress: false
},
parallel: true
})
]
},
devtool: '#source-map',
plugins
})
}