Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Verhoelen committed May 1, 2019
1 parent 0df2c4a commit 415ae50
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions service/server/ExpressServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ export class ExpressServer {

private applyWebpackDevMiddleware(server: Express) {
if (Environment.isLocal()) {
const webpack = require('webpack')
const config = require('../../webpack.config.js')
const compiler = webpack(config)
const compiler = require('webpack')(config)

const webpackDevMiddleware = require('webpack-dev-middleware')
server.use(webpackDevMiddleware(compiler, {
Expand All @@ -118,8 +117,7 @@ export class ExpressServer {
this.cssFiles = []
} else {
const isomorphicAssets: any = JSON.parse(await fse.readFile('www/static/media/isomorphic-assets.json', 'utf-8'))
this.cssFiles = isomorphicAssets.chunks.app
.filter((path: string) => path.endsWith('.css'))
this.cssFiles = isomorphicAssets.chunks.app.filter((path: string) => path.endsWith('.css'))
}
}

Expand Down

0 comments on commit 415ae50

Please sign in to comment.