Fix prod build

pull/71/head
Chocobozzz 2017-06-11 17:49:13 +02:00
parent 127944aacb
commit 174d46578b
4 changed files with 17 additions and 9 deletions

View File

@ -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'

View File

@ -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),

View File

@ -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

View File

@ -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%;