Skip to content

Commit

Permalink
chore: serve dist dir statically in dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
pimlie committed Apr 3, 2021
1 parent ed6ba9f commit bcf8353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
Expand Down

0 comments on commit bcf8353

Please sign in to comment.