diff options
Diffstat (limited to 'client/config')
-rw-r--r-- | client/config/webpack.common.js | 9 | ||||
-rw-r--r-- | client/config/webpack.dev.js | 11 | ||||
-rw-r--r-- | client/config/webpack.prod.js | 4 |
3 files changed, 16 insertions, 8 deletions
diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js index 266e630f6..459985880 100644 --- a/client/config/webpack.common.js +++ b/client/config/webpack.common.js | |||
@@ -168,6 +168,13 @@ module.exports = function (options) { | |||
168 | helpers.root('src/index.html'), | 168 | helpers.root('src/index.html'), |
169 | helpers.root('src/standalone/videos/embed.html') | 169 | helpers.root('src/standalone/videos/embed.html') |
170 | ] | 170 | ] |
171 | }, | ||
172 | |||
173 | /* File loader for supporting images, for example, in CSS files. | ||
174 | */ | ||
175 | { | ||
176 | test: /\.(jpg|png|gif)$/, | ||
177 | use: 'file-loader' | ||
171 | } | 178 | } |
172 | 179 | ||
173 | ] | 180 | ] |
@@ -271,7 +278,7 @@ module.exports = function (options) { | |||
271 | * See: https://github.com/numical/script-ext-html-webpack-plugin | 278 | * See: https://github.com/numical/script-ext-html-webpack-plugin |
272 | */ | 279 | */ |
273 | new ScriptExtHtmlWebpackPlugin({ | 280 | new ScriptExtHtmlWebpackPlugin({ |
274 | sync: [ /polyfill|vendor/, 'webtorrent.min.js' ], | 281 | sync: [ /polyfill|vendor/ ], |
275 | defaultAttribute: 'async', | 282 | defaultAttribute: 'async', |
276 | preload: [/polyfill|vendor|main/], | 283 | preload: [/polyfill|vendor|main/], |
277 | prefetch: [/chunk/] | 284 | prefetch: [/chunk/] |
diff --git a/client/config/webpack.dev.js b/client/config/webpack.dev.js index 03d6d2fba..d6ebed730 100644 --- a/client/config/webpack.dev.js +++ b/client/config/webpack.dev.js | |||
@@ -22,7 +22,8 @@ const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, { | |||
22 | host: HOST, | 22 | host: HOST, |
23 | port: PORT, | 23 | port: PORT, |
24 | ENV: ENV, | 24 | ENV: ENV, |
25 | HMR: HMR | 25 | HMR: HMR, |
26 | API_URL: 'http://localhost:9000' | ||
26 | }) | 27 | }) |
27 | 28 | ||
28 | const DllBundlesPlugin = require('webpack-dll-bundles-plugin').DllBundlesPlugin | 29 | const DllBundlesPlugin = require('webpack-dll-bundles-plugin').DllBundlesPlugin |
@@ -79,9 +80,7 @@ module.exports = function (env) { | |||
79 | chunkFilename: '[id].chunk.js', | 80 | chunkFilename: '[id].chunk.js', |
80 | 81 | ||
81 | library: 'ac_[name]', | 82 | library: 'ac_[name]', |
82 | libraryTarget: 'var', | 83 | libraryTarget: 'var' |
83 | |||
84 | publicPath: '/client/' | ||
85 | }, | 84 | }, |
86 | 85 | ||
87 | externals: { | 86 | externals: { |
@@ -125,6 +124,7 @@ module.exports = function (env) { | |||
125 | new DefinePlugin({ | 124 | new DefinePlugin({ |
126 | 'ENV': JSON.stringify(METADATA.ENV), | 125 | 'ENV': JSON.stringify(METADATA.ENV), |
127 | 'HMR': METADATA.HMR, | 126 | 'HMR': METADATA.HMR, |
127 | 'API_URL': JSON.stringify(METADATA.API_URL), | ||
128 | 'process.env': { | 128 | 'process.env': { |
129 | 'ENV': JSON.stringify(METADATA.ENV), | 129 | 'ENV': JSON.stringify(METADATA.ENV), |
130 | 'NODE_ENV': JSON.stringify(METADATA.ENV), | 130 | 'NODE_ENV': JSON.stringify(METADATA.ENV), |
@@ -234,8 +234,7 @@ module.exports = function (env) { | |||
234 | historyApiFallback: true, | 234 | historyApiFallback: true, |
235 | watchOptions: { | 235 | watchOptions: { |
236 | ignored: /node_modules/ | 236 | ignored: /node_modules/ |
237 | }, | 237 | } |
238 | outputPath: helpers.root('dist') | ||
239 | }, | 238 | }, |
240 | 239 | ||
241 | /* | 240 | /* |
diff --git a/client/config/webpack.prod.js b/client/config/webpack.prod.js index 9bb7306af..3f063c7c6 100644 --- a/client/config/webpack.prod.js +++ b/client/config/webpack.prod.js | |||
@@ -26,7 +26,8 @@ const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, { | |||
26 | host: HOST, | 26 | host: HOST, |
27 | port: PORT, | 27 | port: PORT, |
28 | ENV: ENV, | 28 | ENV: ENV, |
29 | HMR: false | 29 | HMR: false, |
30 | API_URL: '' | ||
30 | }) | 31 | }) |
31 | 32 | ||
32 | module.exports = function (env) { | 33 | module.exports = function (env) { |
@@ -125,6 +126,7 @@ module.exports = function (env) { | |||
125 | new DefinePlugin({ | 126 | new DefinePlugin({ |
126 | 'ENV': JSON.stringify(METADATA.ENV), | 127 | 'ENV': JSON.stringify(METADATA.ENV), |
127 | 'HMR': METADATA.HMR, | 128 | 'HMR': METADATA.HMR, |
129 | 'API_URL': JSON.stringify(METADATA.API_URL), | ||
128 | 'process.env': { | 130 | 'process.env': { |
129 | 'ENV': JSON.stringify(METADATA.ENV), | 131 | 'ENV': JSON.stringify(METADATA.ENV), |
130 | 'NODE_ENV': JSON.stringify(METADATA.ENV), | 132 | 'NODE_ENV': JSON.stringify(METADATA.ENV), |