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

module support in eyeglass-exports.js #193

Open
jamesarosen opened this issue Nov 26, 2018 · 1 comment
Open

module support in eyeglass-exports.js #193

jamesarosen opened this issue Nov 26, 2018 · 1 comment
Labels
help wanted package:eyeglass Related to the core eyeglass package in this monorepo.

Comments

@jamesarosen
Copy link

I'm using ember-cli-eyeglass to import an eyeglass-aware package into an Ember project. If the package contains

// 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

// 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.

@chriseppstein
Copy link
Contributor

We need to change this line to return the result of require or the default property depending on whether it's a module or not.

https://github.com/sass-eyeglass/eyeglass/blob/master/packages/eyeglass/src/modules/EyeglassModule.ts#L213

@chriseppstein chriseppstein added the package:eyeglass Related to the core eyeglass package in this monorepo. label Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted package:eyeglass Related to the core eyeglass package in this monorepo.
Projects
None yet
Development

No branches or pull requests

2 participants