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

Syntax errors when reexporting default in index.js file #14698

Closed
mjbvz opened this issue Mar 16, 2017 · 3 comments
Closed

Syntax errors when reexporting default in index.js file #14698

mjbvz opened this issue Mar 16, 2017 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Mar 16, 2017

From @ardentum on March 16, 2017 11:7

  • VSCode Version: Code 1.10.2 (8076a19fdcab7e1fc1707952d652f0bb6c6db331, 2017-03-08T13:56:35.908Z)
  • OS Version: Darwin x64 16.3.0
  • Extensions:
Extension Author Version
ejs-language-support QassimFarid 0.0.1
jsx TwentyChung 0.0.1
python donjayamanne 0.5.5
autoimport steoates 1.2.2
ReactSnippets xabikos 1.2.0
Material-theme zhuangtongfa 2.2.7

Hi! I have a very unpleasant bug with reexporting default submodule export in index files. It is a very common case for me and it works with current bundler (Webpack), but looks broken in the editor.

Steps to Reproduce:

  1. Create submodule.js file with following content:
export default function DefaultExport () {}
export function TestExport () {}
  1. Create index.js with reexports:
export default from './submodule1.js';
export TestExport from './submodule1.js';

VS Code highlights reexports as syntax errors and breaks "Go To Definition" logic, which is very useful.

Here is my jsconfig.json file:

{
    "compilerOptions": {
        "target": "ES6",
        "jsx": "react"
    },
    "exclude": [
        "node_modules",
        "build",
        "tools",
        ".idea"
    ]
}

Thanks!

Copied from original issue: microsoft/vscode#22732

@mjbvz
Copy link
Contributor Author

mjbvz commented Mar 16, 2017

This issue was moved to #14697

@mhegazy
Copy link
Contributor

mhegazy commented Mar 16, 2017

Duplicate of #4813.

Please note that this is a TC39 proposal (currently in stage 1) and not a standard language feature.

@mhegazy mhegazy added the Duplicate An existing issue was already created label Mar 16, 2017
@mjbvz
Copy link
Contributor Author

mjbvz commented Mar 16, 2017

Thanks @mhegazy! Closing as a duplicate of #4813.

@mjbvz mjbvz closed this as completed Mar 16, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants