We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We successfully use fastboot with our ember app. However when trying to implement prember we are getting the following error.
TypeError: URL is not a constructor
We are adding the URL constructor to fastboot using the config/fastboot.js file exporting a buildSandboxGlobals function.
const { URL, URLSearchParams } = require('url'); module.exports = function () { return { buildSandboxGlobals(defaultGlobals) { console.log('buildSandboxGlobals') console.log('defaultGlobals', defaultGlobals) console.log('URL', new URL('https://google.com')); return Object.assign({}, defaultGlobals, { URL, URLSearchParams }); } }; };
When rendering the site in fastboot everything renders, the buildSandboxGlobals function logs the defaultGlobals and the URL constructor works:
App is being served by FastBoot buildSandboxGlobals defaultGlobals { FastBoot: { require: [Function (anonymous)], config: [Function: fastbootConfig], distPath: [Getter] } } URL URL { href: 'https://google.com/', origin: 'https://google.com', protocol: 'https:', username: '', password: '', host: 'google.com', hostname: 'google.com', port: '', pathname: '/', search: '', searchParams: URLSearchParams {}, hash: '' }
When enabling prember we get the following error and no console statements from the buildSandboxGlobals function.
TypeError: URL is not a constructor broccoliNode: { nodeName: 'prember', nodeAnnotation: undefined, ... }, versions: { 'broccoli-builder': '3.5.2', node: 'v16.14.0' }
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
We successfully use fastboot with our ember app. However when trying to implement prember we are getting the following error.
We are adding the URL constructor to fastboot using the config/fastboot.js file exporting a buildSandboxGlobals function.
When rendering the site in fastboot everything renders, the buildSandboxGlobals function logs the defaultGlobals and the URL constructor works:
When enabling prember we get the following error and no console statements from the buildSandboxGlobals function.
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: