Skip to content

Support Import Statements - WIP #77

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

Closed
wants to merge 1 commit into from
Closed

Support Import Statements - WIP #77

wants to merge 1 commit into from

Conversation

Cmdv
Copy link

@Cmdv Cmdv commented Sep 6, 2018

This is a part of #71

I'm not sure if it needed tests in Minify.hs + RoundTrip.hs also I'm wondering if this needs supports all the import specs

@erikd
Copy link
Owner

erikd commented Sep 7, 2018

It would be best of this had tests.

There are also a couple of warnings in the Travis builds that really should be fixed.

@Cmdv
Copy link
Author

Cmdv commented Sep 7, 2018

yeah totally sorry it's a WIP to get some feedback.

just looking at the specs and I don't seem to cove everything but some of the cases I'm not too sure how to deal with:

import defaultExport from "module-name";
import * as name from "module-name";
import { export } from "module-name";
import { export as alias } from "module-name";
import { export1 , export2 } from "module-name";
import { export1 , export2 as alias2 , [...] } from "module-name";
import defaultExport, { export [ , [...] ] } from "module-name";
import defaultExport, * as name from "module-name";
import "module-name";
var promise = import(module-name);

the from and * I'd need pointers if that's ok?

@erikd
Copy link
Owner

erikd commented Sep 7, 2018

I'd say get what you can working and passing tests and then the rest can be dealt with on an as needed basis.

@Cmdv Cmdv changed the title Support Import Statements Support Import Statements - WIP Sep 7, 2018
hdgarrood added a commit to hdgarrood/language-javascript that referenced this pull request Feb 15, 2019
This commit adds support for all forms of the ES module import statement
apart from the dynamic 'import()' form and the bare 'import "mod";' form
(where the import is only being performed for the sake of some side
effects).

Supercedes erikd#77, refs erikd#71.
hdgarrood added a commit to hdgarrood/language-javascript that referenced this pull request Feb 15, 2019
This commit adds support for all forms of the ES module import statement
apart from the dynamic 'import()' form and the bare 'import "mod";' form
(where the import is only being performed for the sake of some side
effects).

Supercedes erikd#77, refs erikd#71.
erikd pushed a commit that referenced this pull request Feb 19, 2019
This commit adds support for all forms of the ES module import statement
apart from the dynamic 'import()' form and the bare 'import "mod";' form
(where the import is only being performed for the sake of some side
effects).

Supercedes #77, refs #71.
@erikd erikd closed this Apr 6, 2019
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.

2 participants