-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.conf.js
49 lines (47 loc) · 1.73 KB
/
webpack.conf.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
const path = require('path');
const webpack = require('webpack');
const __DEV__ = (process.env.NODE_ENV !== 'production');
module.exports = {
devtool: __DEV__ ? 'inline-source-map' : 'cheap-module-source-map',
context: path.resolve(__dirname, 'src/js/'),
entry: ['babel-polyfill', './app.js'],
output: {
path: path.resolve(__dirname, 'dist/js/'),
filename: 'bundle.js',
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015', 'stage-0'],
},
},
],
},
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
},
}),
],
resolve: {
alias: {
TweenLite: path.resolve('node_modules', 'gsap/src/uncompressed/TweenLite.js'),
TweenMax: path.resolve('node_modules', 'gsap/src/uncompressed/TweenMax.js'),
TimelineLite: path.resolve('node_modules', 'gsap/src/uncompressed/TimelineLite.js'),
TimelineMax: path.resolve('node_modules', 'gsap/src/uncompressed/TimelineMax.js'),
ScrollMagic: path.resolve('node_modules', 'scrollmagic/scrollmagic/uncompressed/ScrollMagic.js'),
jquery : path.resolve('node_modules', 'jquery/src/jquery.js'),
bootstrap: path.resolve('node_modules', 'bootstrap/dist/js/bootstrap.js'),
chartjs: path.resolve('node_modules','chart.js/src/chart.js'),
'animation.gsap': path.resolve('node_modules', 'scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js'),
'debug.addIndicators': path.resolve('node_modules', 'scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators.js'),
},
},
};