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

incoming Safari 10.1 module support #14861

Closed
gertcuykens opened this issue Mar 26, 2017 · 2 comments
Closed

incoming Safari 10.1 module support #14861

gertcuykens opened this issue Mar 26, 2017 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@gertcuykens
Copy link

gertcuykens commented Mar 26, 2017

I'm experimenting with Safari 10.1 and so far looking good, I am so happy to get rid of /// <amd-module name="i_hate_doing_this"/> and all the requirejs shenanigans

Basically you just do

<script type="module" src="scripts/index.js"></script>

in your html and we are in es2015 module world, FINALLY!

now the me starting to panic part, Safari 10.1 wants import './menuelement.js'; not import 'menuelement';

Went trough https://www.typescriptlang.org/docs/handbook/module-resolution.html and I didn't notice mention of this.

Suggestion a new module mode named es2015.js that just replaces import 'menu' to import './menu.js' on compile time. PS also notice the required ./ part not only .js

{
  "compileOnSave": true,
  "compilerOptions": {
    "target": "es2017",
    "module": "es2015.js", <========
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "strictNullChecks": true,
    "noImplicitThis": true,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "sourceMap": true,
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

PS I made a working Safari 10.1+ demo at https://github.com/gertcuykens/mollie-api-go Com'on TypeScript don't let me down on this, we are this close to getting rid of the webpack familie.

@jwbay
Copy link
Contributor

jwbay commented Mar 26, 2017

I asked about this when module resolution started to support baseUrl + path mapping. This was basically the answer - #5039 (comment). Maybe it could be revisited though.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label May 24, 2017
@tkrotoff
Copy link

tkrotoff commented Aug 29, 2017

Duplicate of #13422 and #16577?

@RyanCavanaugh RyanCavanaugh added Duplicate An existing issue was already created and removed Needs Investigation This issue needs a team member to investigate its status. labels Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants