linkedin / linkedin/eyeglass

module support in eyeglass-exports.js

Open
#193 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted package:eyeglass
Dominant language
TypeScript
Stars
738
Forks
48
PR merge metrics
No merged PRs in 30d

Description

I'm using ember-cli-eyeglass to import an eyeglass-aware package into an Ember project. If the package contains
```js
// eyeglass-exports.js
import someSupport from './lib/some-support'
export default …
```
then I get a syntax error on `import`. It works if I change to
```js
// eyeglass-exports.js
const someSupport = require('./lib/some-support')
module.exports = …
```

I don't know whether this belongs in eyeglass, babel-eyeglass, ember-cli-eyeglass, or somewhere else.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how eyeglass-exports.js is loaded and where its JavaScript syntax is parsed. Compare the failing import/export form with the working require/module.exports form, then determine whether the behavior belongs in eyeglass, babel-eyeglass, or ember-cli-eyeglass. Done means an eyeglass-aware package can use the shown module syntax without a syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.