Share Posted July 23, 2017 Hi, I recently switched from JSPM/SystemJS to Rollup for a few reasons and can't figure out how to get the paid plugins to work nicely with it. I installed gsap via npm for all the core stuff, and put ( for example ) the MorphSVGPlugin.js into a vendor folder, since that can't be installed via npm. gsap instantiates and works just fine, but I can't seem to import the extras. import 'gsap' import '../../vendor/MorphSVGPlugin' TweenMax works ( using rollup-plugin-node-resolve ) but I get 'invalid morphSVG tween value: .xxxx' The path to the morphSvg plugin is correct for me. And I tried a named import { MorphSVGPlugin }, * as morphSVG, * as MorphSVGPlugin, and just importing whole file as in code above. Even if I dump the MorphSVG plugin into the node_modules folder ( not a good practice, but I tried it ) it still doesn't work. Any suggestions? Thanks! Link to comment Share on other sites More sharing options...
Author Share Posted July 23, 2017 Nevermind, resolved this - was a Rollup misconfig ( still new to it ). I had to add my vendor directory to support cjs within Rollup gulp.task('js' () => { return rollup.rollup({ entry: "./src/js/theme.js", plugins: [ ... cjs({ include: [ 'node_modules/**', 'src/js/vendor/**' // <-- BINGO ] }), ... }) .then(function (bundle) { ... }) }); 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now