forked from nogtini/atomic-components
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Trying to tackle a 500 error wherein
'use strict'
const Controller = require('trails-controller')
module.exports = class ViewController extends Controller {
render (request, reply) {
reply.view('components/environments/TrailsMix')
}
}
is trying to serve the app via the root component as a "view". Note that components/...
is a pre-build folder, so all views attempting to be served are being looked for these components in the dist
folder which only contains the bundle to be served.
As such, this bundle.js
is no view, but rather simply the payload needed for the browser to take control, spinning up the SPA.
Ideally, we'd want to solve this simply by not extending or rendering from the Controller, but instead simply serving the bundle via the controller on the index request.
Metadata
Metadata
Assignees
Labels
No labels