diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-11 17:49:13 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-11 17:49:13 +0200 |
commit | 174d46578bb719c85686f9bb89abf4330ae4cac1 (patch) | |
tree | 34d7b791dfcd603cc7c2117780c071b74b3cf646 /client/config | |
parent | 127944aacb52721877449a1f202dc0add866ef39 (diff) | |
download | PeerTube-174d46578bb719c85686f9bb89abf4330ae4cac1.tar.gz PeerTube-174d46578bb719c85686f9bb89abf4330ae4cac1.tar.zst PeerTube-174d46578bb719c85686f9bb89abf4330ae4cac1.zip |
Fix prod build
Diffstat (limited to 'client/config')
-rw-r--r-- | client/config/webpack.common.js | 18 | ||||
-rw-r--r-- | client/config/webpack.dev.js | 1 | ||||
-rw-r--r-- | client/config/webpack.prod.js | 5 |
3 files changed, 16 insertions, 8 deletions
diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js index a81bca9d2..61347dba2 100644 --- a/client/config/webpack.common.js +++ b/client/config/webpack.common.js | |||
@@ -135,7 +135,13 @@ module.exports = function (options) { | |||
135 | test: /\.(sass|scss)$/, | 135 | test: /\.(sass|scss)$/, |
136 | use: [ | 136 | use: [ |
137 | 'css-to-string-loader', | 137 | 'css-to-string-loader', |
138 | 'css-loader?sourceMap', | 138 | { |
139 | loader: 'css-loader', | ||
140 | options: { | ||
141 | sourceMap: true, | ||
142 | importLoaders: 1 | ||
143 | } | ||
144 | }, | ||
139 | 'resolve-url-loader', | 145 | 'resolve-url-loader', |
140 | { | 146 | { |
141 | loader: 'sass-loader', | 147 | loader: 'sass-loader', |
@@ -174,7 +180,7 @@ module.exports = function (options) { | |||
174 | */ | 180 | */ |
175 | { | 181 | { |
176 | test: /\.(jpg|png|gif)$/, | 182 | test: /\.(jpg|png|gif)$/, |
177 | use: 'file-loader' | 183 | use: 'url-loader' |
178 | } | 184 | } |
179 | 185 | ||
180 | ] | 186 | ] |
@@ -256,10 +262,10 @@ module.exports = function (options) { | |||
256 | */ | 262 | */ |
257 | // Used by embed.html | 263 | // Used by embed.html |
258 | new CopyWebpackPlugin([ | 264 | new CopyWebpackPlugin([ |
259 | { | 265 | // { |
260 | from: 'src/assets', | 266 | // from: 'src/assets', |
261 | to: 'assets' | 267 | // to: 'assets' |
262 | }, | 268 | // }, |
263 | { | 269 | { |
264 | from: 'src/standalone', | 270 | from: 'src/standalone', |
265 | to: 'standalone' | 271 | to: 'standalone' |
diff --git a/client/config/webpack.dev.js b/client/config/webpack.dev.js index 42d9ca37e..c472ac762 100644 --- a/client/config/webpack.dev.js +++ b/client/config/webpack.dev.js | |||
@@ -121,6 +121,7 @@ module.exports = function (env) { | |||
121 | 'ENV': JSON.stringify(METADATA.ENV), | 121 | 'ENV': JSON.stringify(METADATA.ENV), |
122 | 'HMR': METADATA.HMR, | 122 | 'HMR': METADATA.HMR, |
123 | 'API_URL': JSON.stringify(METADATA.API_URL), | 123 | 'API_URL': JSON.stringify(METADATA.API_URL), |
124 | 'process.version': JSON.stringify(process.version), | ||
124 | 'process.env': { | 125 | 'process.env': { |
125 | 'ENV': JSON.stringify(METADATA.ENV), | 126 | 'ENV': JSON.stringify(METADATA.ENV), |
126 | 'NODE_ENV': JSON.stringify(METADATA.ENV), | 127 | 'NODE_ENV': JSON.stringify(METADATA.ENV), |
diff --git a/client/config/webpack.prod.js b/client/config/webpack.prod.js index c27a4f4b0..1484e2ac2 100644 --- a/client/config/webpack.prod.js +++ b/client/config/webpack.prod.js | |||
@@ -123,13 +123,14 @@ module.exports = function (env) { | |||
123 | 'ENV': JSON.stringify(METADATA.ENV), | 123 | 'ENV': JSON.stringify(METADATA.ENV), |
124 | 'HMR': METADATA.HMR, | 124 | 'HMR': METADATA.HMR, |
125 | 'API_URL': JSON.stringify(METADATA.API_URL), | 125 | 'API_URL': JSON.stringify(METADATA.API_URL), |
126 | 'process.version': JSON.stringify(process.version), | ||
126 | 'process.env': { | 127 | 'process.env': { |
127 | 'ENV': JSON.stringify(METADATA.ENV), | 128 | 'ENV': JSON.stringify(METADATA.ENV), |
128 | 'NODE_ENV': JSON.stringify(METADATA.ENV), | 129 | 'NODE_ENV': JSON.stringify(METADATA.ENV), |
129 | 'HMR': METADATA.HMR | 130 | 'HMR': METADATA.HMR |
130 | } | 131 | } |
131 | }), | 132 | }), |
132 | /** | 133 | /** |
133 | * Plugin: UglifyJsPlugin | 134 | * Plugin: UglifyJsPlugin |
134 | * Description: Minimize all JavaScript output of chunks. | 135 | * Description: Minimize all JavaScript output of chunks. |
135 | * Loaders are switched into minimizing mode. | 136 | * Loaders are switched into minimizing mode. |
@@ -269,7 +270,7 @@ module.exports = function (env) { | |||
269 | global: true, | 270 | global: true, |
270 | crypto: 'empty', | 271 | crypto: 'empty', |
271 | fs: 'empty', | 272 | fs: 'empty', |
272 | process: false, | 273 | process: true, |
273 | module: false, | 274 | module: false, |
274 | clearImmediate: false, | 275 | clearImmediate: false, |
275 | setImmediate: false | 276 | setImmediate: false |