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)$/, test: /\.(sass|scss)$/,
use: [ use: [
'css-to-string-loader', 'css-to-string-loader',
'css-loader?sourceMap', {
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 1
}
},
'resolve-url-loader', 'resolve-url-loader',
{ {
loader: 'sass-loader', loader: 'sass-loader',
@ -174,7 +180,7 @@ module.exports = function (options) {
*/ */
{ {
test: /\.(jpg|png|gif)$/, test: /\.(jpg|png|gif)$/,
use: 'file-loader' use: 'url-loader'
} }
] ]
@ -256,10 +262,10 @@ module.exports = function (options) {
*/ */
// Used by embed.html // Used by embed.html
new CopyWebpackPlugin([ new CopyWebpackPlugin([
{ // {
from: 'src/assets', // from: 'src/assets',
to: 'assets' // to: 'assets'
}, // },
{ {
from: 'src/standalone', from: 'src/standalone',
to: 'standalone' to: 'standalone'

View File

@ -121,6 +121,7 @@ module.exports = function (env) {
'ENV': JSON.stringify(METADATA.ENV), 'ENV': JSON.stringify(METADATA.ENV),
'HMR': METADATA.HMR, 'HMR': METADATA.HMR,
'API_URL': JSON.stringify(METADATA.API_URL), 'API_URL': JSON.stringify(METADATA.API_URL),
'process.version': JSON.stringify(process.version),
'process.env': { 'process.env': {
'ENV': JSON.stringify(METADATA.ENV), 'ENV': JSON.stringify(METADATA.ENV),
'NODE_ENV': JSON.stringify(METADATA.ENV), 'NODE_ENV': JSON.stringify(METADATA.ENV),

View File

@ -123,6 +123,7 @@ module.exports = function (env) {
'ENV': JSON.stringify(METADATA.ENV), 'ENV': JSON.stringify(METADATA.ENV),
'HMR': METADATA.HMR, 'HMR': METADATA.HMR,
'API_URL': JSON.stringify(METADATA.API_URL), 'API_URL': JSON.stringify(METADATA.API_URL),
'process.version': JSON.stringify(process.version),
'process.env': { 'process.env': {
'ENV': JSON.stringify(METADATA.ENV), 'ENV': JSON.stringify(METADATA.ENV),
'NODE_ENV': JSON.stringify(METADATA.ENV), 'NODE_ENV': JSON.stringify(METADATA.ENV),
@ -269,7 +270,7 @@ module.exports = function (env) {
global: true, global: true,
crypto: 'empty', crypto: 'empty',
fs: 'empty', fs: 'empty',
process: false, process: true,
module: false, module: false,
clearImmediate: false, clearImmediate: false,
setImmediate: false setImmediate: false

View File

@ -51,7 +51,7 @@
a { a {
color: inherit !important; color: inherit !important;
display: block; display: block;
background: url(/assets/logo.png) no-repeat; background: url('../assets/logo.png') no-repeat;
background-size: contain; background-size: contain;
background-position: center; background-position: center;
height: 100%; height: 100%;