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

Apply babel to .mjs files #6253

Merged
merged 1 commit into from Feb 11, 2019
Merged

Apply babel to .mjs files #6253

merged 1 commit into from Feb 11, 2019

Conversation

developit
Copy link
Contributor

Noticed this - seems like .mjs files are included for module resolution, but weren't being transpiled by Babel.

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

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

Should we also allow pages ending in .mjs 🤔

@timneutkens timneutkens merged commit 734513b into vercel:canary Feb 11, 2019
@developit
Copy link
Contributor Author

@timneutkens ooh, good point. IMO any case where js and jsx are allowed it seems logical to allow all 3.

@sheerun
Copy link
Contributor

sheerun commented Feb 13, 2019

Unfortunately this doesn't work when .mjs are inside node_modules, because such files are excluded by exclude block..

          exclude: (path) => {
            if (/next-server[\\/]dist[\\/]lib/.exec(path)) {
              return false
            }
            return /node_modules/.exec(path)
          },

@lock lock bot locked as resolved and limited conversation to collaborators Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants