-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
Context
- node version: 10.2.1
- joi version: 13.3.0
- environment (node, browser): node
- used with (hapi, standalone, ...): hapi
- any other relevant information: bundling with Fuse-Box
What are you trying to achieve or the steps to reproduce ?
I'm attempting to create a server-side (nodejs) application bundled with the Fuse-Box bundler. My bundle is created properly, however when I run it, I get issues resulting from this line: https://github.com/hapijs/joi/blob/master/lib/schemas.js#L5 . It seems the backward reference here is something the bundler has trouble figuring out. I've edited my local copy of Joi to change the require from:
const Joi = require('../');to
const Joi = require('./index');Everything works properly now. Before you close this as bundler related and not Joi related, my question is: can this be changed, and if not, what is the significance in the way the current require line works that would cause issues with changing to requiring the file explicitly?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement