Error when compiling with rollup babel
See original GitHub issueHello,
I’m trying to import lory.js with rollup babel but it’s crashing in a number of places.
This is my task: https://gist.github.com/magicspon/db9b427b778b54b122502a950970e057
The first error is as follows: SyntaxError: Unexpected token (214:19) in /Users/stockley/websites/snapldn/node_modules/lory.js/src/lory.js
options = {...defaults, ...opts};
It looks like lory.js is not being transpiled.
Has anyone had any issues importing lory
. (It works perfectly with browserify
).
Thanks Dave
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Latest babel preset doesn't work with rollup #120 - GitHub
In looking at the referenced babel docs, it seems to suggest using a module transformer, but I assume rollup/rollup-plugin-babel should be ...
Read more >Rollup error: could not load a module from @babel/runtime ...
I'm trying to compile this index.js file using rollup: import React from "react"; import ReactDOM from "react-dom"; import Grid from ...
Read more >@rollup/plugin-typescript - npm
If a type error is detected, the Rollup build is aborted when this option is set to true. files , include , exclude....
Read more >rollup-plugin-babel | Yarn - Package Manager
This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel. Seamless integration between Rollup and Babel.
Read more >Automating a React Library's Build Process with RollupJS and ...
Required for @rollup/plugin-babel , which will be discussed later on in this tutorial. @babel/preset-env - A preset that provides a sensible ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It was easier than expected, here it is: https://github.com/mahish/lory/tree/build-with-rollup . I deleted all packages. Then installed via
npm
:So basically, testing environement is missing, which Ive never done before. I might try it tmrw. Or at least provide some simple working example (tested it in my project and it is working). However, the package is much more minimalistic now and does the job. Anyway I would be happy if anyone can try it out. Copy the
./dist/lory.module.js
(for es module) or./dist/lory.min.js
(umd) to your projects and let me know!Will be taking a closer look at using lory with rollup as soon as I am able.