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

Code from external modules not correctly transpiled #28

Closed
claustres opened this issue Apr 8, 2018 · 3 comments
Closed

Code from external modules not correctly transpiled #28

claustres opened this issue Apr 8, 2018 · 3 comments
Labels

Comments

@claustres
Copy link
Member

claustres commented Apr 8, 2018

@claustres claustres added the bug label Apr 8, 2018
@claustres
Copy link
Member Author

claustres commented Apr 8, 2018

Replacing all async/await is not sufficient, then we get errors like: Uncaught SyntaxError: Use of const in strict mode.

@claustres
Copy link
Member Author

claustres commented Apr 12, 2018

Different things have been tested without success so far:

  • use include to add our module paths to the webpack config of babel-loader & vue-loader
    • using relative or absolute path without symlinks using fs.realpathSync
  • remove our modules from the exclude pattern like /.*node_modules((?!kCore).)*$/
  • process everything with babel-loader in project including node_modules
    • raises some issues on leaflet plugins and index.html
  • set option resolve.symlinks: false
  • changed loadComponent to target absolute path without symlinks using fs.realpathSync
    • components are not found at run time
  • added alias targeting all modules, eg kCore > kCore/lib/client
  • removed yarn links and resolve using ..
    • this seems to indicate it is not related to symlinks
  • set babel options directly in webpack config instead of using .babelrc
    • this seems to indicate it is not related to bad config files read from modules instead of app

@claustres
Copy link
Member Author

claustres commented Apr 12, 2018

The sole solution that seems to work is to integrate module files into app files, without simlinks, so that babel correctly transpiles it.

claustres added a commit to kalisio/kTeam that referenced this issue Apr 12, 2018
claustres added a commit to kalisio/kEvent that referenced this issue Apr 12, 2018
claustres added a commit to kalisio/kCore that referenced this issue Apr 12, 2018
claustres added a commit to kalisio/crisis that referenced this issue Apr 13, 2018
claustres added a commit to kalisio/crisis that referenced this issue Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant