Commit 0406d47a authored by Florian Pagnoux's avatar Florian Pagnoux
Browse files

Fix live reload in dev mode

parent ccf419f7
const isProd = process.env.PRODUCTION;
const isProd = require('../config').isProd
if (! isProd) {
require('../styles/style.css')
......
export const basename = process.env.BASENAME || ''
export const isProd = process.env.PRODUCTION
module.exports = {
basename: process.env.BASENAME || '',
isProd: process.env.PRODUCTION
}
......@@ -3,6 +3,7 @@ const loader = require('./server/loader')
const keyBy = require('lodash.keyby')
const webpack = require('webpack')
const { parsed: localEnv } = require('dotenv').config()
const basename = require('./config').basename
module.exports = withCSS({
cssModules: false,
......@@ -25,5 +26,5 @@ module.exports = withCSS({
)
})
},
assetPrefix: (localEnv && localEnv.BASENAME) || "."
assetPrefix: basename
})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment