Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
module import error while working with Rollup #73
I am using rollup to bundle i18next, i18next-xhr-backend, jquery-i18next with other ES6 modules, after rollup bundled these files successfully, browser logged an error message from i18next-xhr-backend/lib/index.js:
I checked the source file, it seems that this line doesn't work as expected:
Below is the rollup config:
all modules now have a
so there is now:
and for umd users /i18next(.min).js generated by rollup
not sure doing the same here for i18next, i18next-xhr-backend, i18next-browser-languageDetector https://github.com/i18next/i18nextify/blob/master/rollup.config.js
only difference as i see is:
but seems to work there...
It seems to be a plugin issue, probably the rollup-plugin-includepaths? What's odd is, I tried to uninstall and reinstall npm packages with some minor changes in rollup.config.js(and more include paths in includepathOptions, I don't think this would affect npm packages though), the error in browser this time is '18next-xhr-backend doesn't export default...', so I change the relative path again then it works....
I'll try your rollup.config.js later and see if it works.