Skip to content

Conversation

jashtanna007
Copy link

Fixes #7636

Updated the webpack.config.js example in the 'Getting Started' guide to use modern ES6 module syntax.

  • Read and sign the [CLA][1]. PRs that haven't signed it won't be accepted.
  • Make sure your PR complies with the [writer's guide][2].
  • Review the diff carefully as sometimes this can reveal issues.
  • Do not abandon your Pull Request: [Stale Pull Requests][3].

Copy link

vercel bot commented Oct 9, 2025

@jashtanna007 is attempting to deploy a commit to the OpenJS Foundation Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

linux-foundation-easycla bot commented Oct 9, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but the name of the config file needs to be webpack.config.mjs if we use module syntax.

@evenstensberg
Copy link
Member

Also, I think we need something to show that we can use .cjs, .mjs and .jsfor config names along with examples. Could you look at how #7518 does this?

@jashtanna007
Copy link
Author

Hi @evenstensberg, thank you for your patience. I have implemented the tabbed code group as you suggested, but I am completely stuck on a persistent linting error.

The error is Parsing error: Could not parse import/exports with acorn.

It seems the linter is not configured to handle import statements at the top of the .mdx file, which is necessary to use the <CodeGroup> and <CodeBlock> components. I have tried several formatting variations without success.

As I am unfamiliar with the specifics of this project's ESLint and MDX configuration, could you please provide some guidance on the correct way to import and use these components in a .mdx guide?

Thank you for your help!

@evenstensberg
Copy link
Member

No problems, thanks for your contribution! I think the next step is to try fix that before merging this pr.

@jashtanna007
Copy link
Author

Thanks for the reply, @evenstensberg!

I'm ready to fix the linting error. As I'm unfamiliar with this project's specific MDX/ESLint setup, could you please point me in the right direction or provide an example of the correct way to import and use the <CodeGroup> component in a guide file?

I'm eager to make the required changes as soon as I know the correct approach. Thanks again!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Update documentation examples to ES6

2 participants