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

Rollup prevents extending riot object #1864

Closed
rogueg opened this issue Jul 1, 2016 · 1 comment
Closed

Rollup prevents extending riot object #1864

rogueg opened this issue Jul 1, 2016 · 1 comment
Assignees
Milestone

Comments

@rogueg
Copy link
Contributor

rogueg commented Jul 1, 2016

On next I get this error

Can't add property X, object is not extensible

When trying to set riot.util.tmpl.errorHandler and riot.route. It looks like rollup adds an Object.freeze call to the end of a bundle.

I looked at the rollup source, and there doesn't seem to be a way to avoid this. @GianlucaGuarini any thoughts on how to handle it? Maybe we can avoid using rollup for non-test code?

@rogueg rogueg added the bug label Jul 1, 2016
@rogueg rogueg added this to the 3.0.0 milestone Jul 1, 2016
@GianlucaGuarini GianlucaGuarini self-assigned this Jul 1, 2016
GianlucaGuarini added a commit that referenced this issue Jul 2, 2016
@GianlucaGuarini
Copy link
Member

GianlucaGuarini commented Jul 2, 2016

Thanks @rogueg for reporting it. I have solved the issue and enabled custom riot es6 bundles.

import { mount, mixin } from 'riot'

mixin('foo', bar)
mount('my-tag')

aMarCruz pushed a commit to riot/compiler that referenced this issue Aug 30, 2016
Add support for es6 `import` statements. Thanks to @kuashe!

Related to [riot#1715](riot/riot#1715), [riot#1784](riot/riot#1784), and [riot#1864](riot/riot#1864).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants