Coder Social home page Coder Social logo

Comments (8)

Anthodpnt avatar Anthodpnt commented on May 7, 2024 3

@wassim

I'm happy to announce that the latest release v1.3.6 now provides an ES5 version of Highway.
Please give it a try and keep us informed about your issue.

Best regards,
Anthodpnt

from highway.

Anthodpnt avatar Anthodpnt commented on May 7, 2024 2

Hi @wassim,

Highway comes in ES6 and I pretty sure it's not compiled through babel maybe because you are ignoring the node_modules which result in your code being compiled in ES5 mixed with Highway that remains in ES6.

Please check out the basic-polyfill example that should help you change your configuration in order to include Highway in the compilation process. This is an example using the babel-loader through Webpack.

This is our will to keep Highway in ES6 but we will consider providing an ES5 version to avoid this kind of repetitive issues 😃. Until then please keep us informed if this solution fixed your issue.

Best regards,
Anthodpnt

from highway.

Anthodpnt avatar Anthodpnt commented on May 7, 2024 1

@wassim The problem don't really come from Highway but from your ESLint configuration that make the compilation fails on errors and that's not a good practice IMO.

If you change the version in order to support latest features of ECMAscript and disable the fail on error option or something you should be able to at least finish your compilation properly...

On our side we are considering an ES5 version of Highway that might come very soon.

from highway.

wassim avatar wassim commented on May 7, 2024

@Anthodpnt thanks. Indeed I was ignoring the node_modules/@Dogstudio. Now eslint isn't happy 😭

error  in ./node_modules/@dogstudio/highway/dist/highway.js

Module build failed:
232 :    *
233 :    * @return {object} Promise
234 :    */
235 :   show() {
236 :     return new Promise(async resolve => {
                                   ^
Unexpected token (236:29) 

I saw that you are using eslint as well, are you linting successfully?

from highway.

Anthodpnt avatar Anthodpnt commented on May 7, 2024

@wassim

I don't know how you configured your .eslintrc file but apparently it doesn't support async/await and returns errors. Maybe you should consider changing the ecmaVersion to 2018 or checkout the configuration we have for Highway.

from highway.

wassim avatar wassim commented on May 7, 2024

Couldn't pass through the multiple errors I'm getting. Would love to see a compiled es5 version.

from highway.

wassim avatar wassim commented on May 7, 2024

Thanks! Working nice now 👌

from highway.

Anthodpnt avatar Anthodpnt commented on May 7, 2024

Perfect ! Closing the issue then...

from highway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.