@financial-times/x-engine 8.2.2 → 8.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server.js +3 -2
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -4,13 +4,14 @@ const resolvePeer = require('./concerns/resolve-peer')
|
|
|
4
4
|
const formatConfig = require('./concerns/format-config')
|
|
5
5
|
|
|
6
6
|
// 1. try to load the application's package manifest
|
|
7
|
-
const
|
|
7
|
+
const pkgPath = resolvePkg()
|
|
8
|
+
const pkg = require(pkgPath)
|
|
8
9
|
|
|
9
10
|
// 2. if we have the manifest then find the engine configuration
|
|
10
11
|
const raw = deepGet(pkg, 'x-dash.engine.server')
|
|
11
12
|
|
|
12
13
|
if (!raw) {
|
|
13
|
-
throw new Error(`x-engine
|
|
14
|
+
throw new Error(`x-engine server configuration not found in ${pkg.name}'s package.json (${pkgPath}). this configuration is required so that x-engine knows which JSX runtime to use. follow the configuration guide to add this configuration: https://github.com/Financial-Times/x-dash/tree/main/packages/x-engine#configuration`)
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
// 3. format the configuration we've loaded
|