Skip to content
New issue

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

[documentation only] minor error in sample code #8653

Closed
warren-bank opened this issue Jan 31, 2024 · 3 comments
Closed

[documentation only] minor error in sample code #8653

warren-bank opened this issue Jan 31, 2024 · 3 comments

Comments

@warren-bank
Copy link

Reproduction

https://github.com/remix-run/remix/blob/main/docs/file-conventions/remix-config.md#servernodebuiltinspolyfill

System Info

N/A

Used Package Manager

npm

Expected Behavior

typeof module.exports.serverNodeBuiltinsPolyfill.globals === 'object'
typeof module.exports.globals === 'undefined'

Actual Behavior

typeof module.exports.serverNodeBuiltinsPolyfill.globals === 'undefined'
typeof module.exports.globals === 'object'
@brophdawg11
Copy link
Contributor

Can you elaborate a bit? I'm not sure quite what you're suggesting the docs be updated to?

@brophdawg11 brophdawg11 added the needs-response We need a response from the original author about this issue/PR label Feb 2, 2024
@warren-bank
Copy link
Author

sorry.. I thought that would be sufficiently clear;
please correct me if I'm wrong, as I'm new to this framework..
but it would seem to me that:

/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
  serverNodeBuiltinsPolyfill: {
    modules: {
      buffer: true, // Provide a JSPM polyfill
      fs: "empty", // Provide an empty polyfill
    },
  },
  globals: {
    Buffer: true,
  },
};

should be:

/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
  serverNodeBuiltinsPolyfill: {
    modules: {
      buffer: true, // Provide a JSPM polyfill
      fs: "empty", // Provide an empty polyfill
    },
    globals: {
      Buffer: true,
    },
  },
};

@github-actions github-actions bot removed the needs-response We need a response from the original author about this issue/PR label Feb 2, 2024
@brophdawg11
Copy link
Contributor

ahh ok even with that side by side it took me a while to spot the difference! Just fixed in a5d10eb. Thanks for the callout!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants