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

Class constructor Transition/Renderer cannot be invoked without 'new' #33

Closed
ivandaum opened this issue Sep 27, 2018 · 6 comments
Closed
Assignees

Comments

@ivandaum
Copy link

Hi guys,

I was trying to follow the dummy tutorial with Hightway to implement a simple transition between two pages, but I met the same issue as #6. I'm using Webpack 4 with the UglifyJs plugin.

For the record, I added a resolve with 'build/es5/highway.min.js' in my webpack, and even copied your babel configuration, but it don't seem to fix the issue (not a pro user of Webpack though).

Do you know why I meet this error? Anyway, Hightway looks great an I can't wait to implement it everywhere 🔥!

@ThaoD5
Copy link
Contributor

ThaoD5 commented Sep 27, 2018

Hello @ivandaum can you provide us some more informations about your Highway version ? Maybe try an update of it in case your version is behind ?

Thanks for you input,

Thao

@ThaoD5 ThaoD5 self-assigned this Sep 27, 2018
@ivandaum
Copy link
Author

Hi @ThaoD5,

I'm currently using Higthway 2.0.8.

@ThaoD5
Copy link
Contributor

ThaoD5 commented Sep 27, 2018

It could be interesting to have your webpack.config.js here so that we can maybe figure things out faster, would this be possible for you ?

@ivandaum
Copy link
Author

ivandaum commented Sep 27, 2018

My bad, I managed to understand what you meant in #6 and fixed it (I thought the es5 build was auto-implement with the alias)!

For those who, like me, has trouble to understand, it can be fix by adding the follow line in your webpack, after the exclude: /node_modules/ :

include: '/node_modules/@dogstudio/highway/build/es5/highway.js',

Anway, thanks a lot guys!

@ThaoD5
Copy link
Contributor

ThaoD5 commented Sep 27, 2018

@ivandaum glad you found a solution for this, thanks for maybe enlightening other people that could have the same issue :)

Have a good day !

@ghost
Copy link

ghost commented Nov 7, 2018

@ivandaum I found a better solution to your problem. In your case you exclude completely node_modules and if you add a new library you will have to add the new library in include.

I prefer to import the right file into javascript:

import Highway from '@dogstudio/highway/build/es5/highway.js';

In the documentation:

import Highway from '@dogstudio/highway';

😊👋

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

No branches or pull requests

2 participants