From bcf8353d737fc75ee3493c66d0496da57c6855cc Mon Sep 17 00:00:00 2001 From: pimlie Date: Sat, 3 Apr 2021 19:18:41 +0200 Subject: [PATCH] chore: serve dist dir statically in dev server --- examples/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server.js b/examples/server.js index 30be340b..7eb40dc8 100644 --- a/examples/server.js +++ b/examples/server.js @@ -9,7 +9,6 @@ const webpackConfig = require('./webpack.config') const jiti = require('./jiti') const { renderPage } = jiti('./ssr/server.js') -// const { renderPage } = require('./ssr/server') const app = express() @@ -34,6 +33,7 @@ fs.readdirSync(__dirname) app.use(express.static(path.join(__dirname, '_static'))) app.use(express.static(__dirname)) +app.use('/_static/dist', express.static(path.join(__dirname, '../dist'))) app.use((req, res, next) => { // Return empty css/javascript files if the file didnt exists