aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/config/webpack.dev.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-09-06 22:40:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-09-06 22:40:57 +0200
commitab32b0fc805b92c5a1d7ac5901cb1a38e94622ca (patch)
tree1749a7390cf0a726a179c5fa554053f5c0f0e51c /client/config/webpack.dev.js
parent088a967fe0bc285aa7811515f6a9655e1144b9f9 (diff)
downloadPeerTube-ab32b0fc805b92c5a1d7ac5901cb1a38e94622ca.tar.gz
PeerTube-ab32b0fc805b92c5a1d7ac5901cb1a38e94622ca.tar.zst
PeerTube-ab32b0fc805b92c5a1d7ac5901cb1a38e94622ca.zip
Dirty update to Angular RC6
Diffstat (limited to 'client/config/webpack.dev.js')
-rw-r--r--client/config/webpack.dev.js27
1 files changed, 23 insertions, 4 deletions
diff --git a/client/config/webpack.dev.js b/client/config/webpack.dev.js
index 50193bf58..fede16932 100644
--- a/client/config/webpack.dev.js
+++ b/client/config/webpack.dev.js
@@ -6,15 +6,18 @@ const commonConfig = require('./webpack.common.js') // the settings that are com
6 * Webpack Plugins 6 * Webpack Plugins
7 */ 7 */
8const DefinePlugin = require('webpack/lib/DefinePlugin') 8const DefinePlugin = require('webpack/lib/DefinePlugin')
9const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin')
9 10
10/** 11/**
11 * Webpack Constants 12 * Webpack Constants
12 */ 13 */
13const ENV = process.env.ENV = process.env.NODE_ENV = 'development' 14const ENV = process.env.ENV = process.env.NODE_ENV = 'development'
15const HOST = process.env.HOST || 'localhost'
16const PORT = process.env.PORT || 3000
14const HMR = helpers.hasProcessFlag('hot') 17const HMR = helpers.hasProcessFlag('hot')
15const METADATA = webpackMerge(commonConfig.metadata, { 18const METADATA = webpackMerge(commonConfig.metadata, {
16 host: 'localhost', 19 host: HOST,
17 port: 3000, 20 port: PORT,
18 ENV: ENV, 21 ENV: ENV,
19 HMR: HMR 22 HMR: HMR
20}) 23})
@@ -81,7 +84,10 @@ module.exports = webpackMerge(commonConfig, {
81 * 84 *
82 * See: http://webpack.github.io/docs/configuration.html#output-chunkfilename 85 * See: http://webpack.github.io/docs/configuration.html#output-chunkfilename
83 */ 86 */
84 chunkFilename: '[id].chunk.js' 87 chunkFilename: '[id].chunk.js',
88
89 library: 'ac_[name]',
90 libraryTarget: 'var'
85 91
86 }, 92 },
87 93
@@ -109,7 +115,9 @@ module.exports = webpackMerge(commonConfig, {
109 'NODE_ENV': JSON.stringify(METADATA.ENV), 115 'NODE_ENV': JSON.stringify(METADATA.ENV),
110 'HMR': METADATA.HMR 116 'HMR': METADATA.HMR
111 } 117 }
112 }) 118 }),
119
120 new NamedModulesPlugin()
113 ], 121 ],
114 122
115 /** 123 /**
@@ -124,6 +132,17 @@ module.exports = webpackMerge(commonConfig, {
124 resourcePath: 'src' 132 resourcePath: 'src'
125 }, 133 },
126 134
135 devServer: {
136 port: METADATA.port,
137 host: METADATA.host,
138 historyApiFallback: true,
139 watchOptions: {
140 aggregateTimeout: 300,
141 poll: 1000
142 },
143 outputPath: helpers.root('dist')
144 },
145
127 /* 146 /*
128 * Include polyfills or mocks for various node stuff 147 * Include polyfills or mocks for various node stuff
129 * Description: Node configuration 148 * Description: Node configuration