Skip to content

feat(remix-dev): add suppport for .mjs and .cjs configs#3675

Merged
kentcdodds merged 4 commits intodevfrom
dynamic-import-config
Aug 4, 2022
Merged

feat(remix-dev): add suppport for .mjs and .cjs configs#3675
kentcdodds merged 4 commits intodevfrom
dynamic-import-config

Conversation

@jacob-ebey
Copy link
Copy Markdown
Member

Allows remix.config.js to be written as ESM or CJS following package.json type field conventions for resolution.

I.e:

If package.json "type": "module"

  • .js loaded as ESM
  • .mjs loaded as ESM
  • .cjs loaded as CJS

If package.json is not "type": "module"

  • .js loaded as CJS
  • .mjs loaded as ESM
  • .cjs loaded as CJS

Closes: #

  • Docs
  • Tests

Testing Strategy:

Existing functionality covered by existing tests.

Copy link
Copy Markdown
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Solid. This is great 👍

@kentcdodds
Copy link
Copy Markdown
Member

Something weird going on with the tests?

@kentcdodds
Copy link
Copy Markdown
Member

Looks like we maybe should include a test or two for this and fix the tests that are broken in this PR

@MichaelDeBoey MichaelDeBoey changed the title feat: add suppport for .mjs and .cjs configs feat(remix-dev): add suppport for .mjs and .cjs configs Jul 7, 2022
Copy link
Copy Markdown
Member

@MichaelDeBoey MichaelDeBoey left a comment

Choose a reason for hiding this comment

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

What about supporting .ts config files?
Do we want that as well?

@kentcdodds
Copy link
Copy Markdown
Member

What about supporting .ts config files?

I think supporting .ts files is a good goal, but maybe we should do that in a separate PR.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 3, 2022

🦋 Changeset detected

Latest commit: da2d69d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@remix-run/dev Patch
create-remix Patch
remix Patch
@remix-run/eslint-config Patch
@remix-run/react Patch
@remix-run/serve Patch
@remix-run/server-runtime Patch
@remix-run/cloudflare Patch
@remix-run/node Patch
@remix-run/deno Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/vercel Patch
@remix-run/architect Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kentcdodds kentcdodds merged commit 551c925 into dev Aug 4, 2022
@kentcdodds kentcdodds deleted the dynamic-import-config branch August 4, 2022 21:26
@MichaelDeBoey MichaelDeBoey added the awaiting release This issue has been fixed and will be released soon label Aug 12, 2022
@MichaelDeBoey MichaelDeBoey removed the awaiting release This issue has been fixed and will be released soon label Aug 12, 2022
TooTallNate pushed a commit to vercel/vercel that referenced this pull request Jan 13, 2023
…g" (#8793)

Adds support for `remix.config.mjs` and `remix.config.cjs` and
also updates the example/fixtures to the latest version of Remix.

See: remix-run/remix#3675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants