From 174d46578bb719c85686f9bb89abf4330ae4cac1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 11 Jun 2017 17:49:13 +0200 Subject: Fix prod build --- client/config/webpack.common.js | 18 ++++++++++++------ client/config/webpack.dev.js | 1 + client/config/webpack.prod.js | 5 +++-- client/src/app/app.component.scss | 2 +- 4 files changed, 17 insertions(+), 9 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) { test: /\.(sass|scss)$/, use: [ 'css-to-string-loader', - 'css-loader?sourceMap', + { + loader: 'css-loader', + options: { + sourceMap: true, + importLoaders: 1 + } + }, 'resolve-url-loader', { loader: 'sass-loader', @@ -174,7 +180,7 @@ module.exports = function (options) { */ { test: /\.(jpg|png|gif)$/, - use: 'file-loader' + use: 'url-loader' } ] @@ -256,10 +262,10 @@ module.exports = function (options) { */ // Used by embed.html new CopyWebpackPlugin([ - { - from: 'src/assets', - to: 'assets' - }, + // { + // from: 'src/assets', + // to: 'assets' + // }, { from: 'src/standalone', 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) { 'ENV': JSON.stringify(METADATA.ENV), 'HMR': METADATA.HMR, 'API_URL': JSON.stringify(METADATA.API_URL), + 'process.version': JSON.stringify(process.version), 'process.env': { 'ENV': JSON.stringify(METADATA.ENV), '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) { 'ENV': JSON.stringify(METADATA.ENV), 'HMR': METADATA.HMR, 'API_URL': JSON.stringify(METADATA.API_URL), + 'process.version': JSON.stringify(process.version), 'process.env': { 'ENV': JSON.stringify(METADATA.ENV), 'NODE_ENV': JSON.stringify(METADATA.ENV), 'HMR': METADATA.HMR } }), -/** + /** * Plugin: UglifyJsPlugin * Description: Minimize all JavaScript output of chunks. * Loaders are switched into minimizing mode. @@ -269,7 +270,7 @@ module.exports = function (env) { global: true, crypto: 'empty', fs: 'empty', - process: false, + process: true, module: false, clearImmediate: false, setImmediate: false diff --git a/client/src/app/app.component.scss b/client/src/app/app.component.scss index a98e57cc3..7259006e5 100644 --- a/client/src/app/app.component.scss +++ b/client/src/app/app.component.scss @@ -51,7 +51,7 @@ a { color: inherit !important; display: block; - background: url(/assets/logo.png) no-repeat; + background: url('../assets/logo.png') no-repeat; background-size: contain; background-position: center; height: 100%; -- cgit v1.2.3