-
Notifications
You must be signed in to change notification settings - Fork 24
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
apollo-client broken #2
Comments
Thanks. Looks like this is caused by rollup-plugin-node-resolve being overzealous. It's trying to import This will presumably happen for any ES015 module that imports a non-ES2015 package. Best thing to do is probably to remove the |
I made a couple of changes to rollup-plugin-node-resolve that I thought would fix this (rollup/rollup-plugin-node-resolve#90, rollup/rollup-plugin-node-resolve#91), but it didn't. The difference now is that it's no longer our fault 😀 The culprit is this file, which is imported by this one and which isn't an ES2015 module. I don't quite understand why it looks like that, when if I build it locally it looks like this: export var version = 'local'; Does that mean anything to you? |
Yeah, this is something we use to try to make the version available, and is kinda broken anyway. It's set in the publish script, I think it's Is that code not a valid ES2015 module? |
Ah, right — this line is the culprit: fs.writeFileSync('./npm/version.js', 'exports.version = \"' + package.version + '\"'); \ It needs to reflect the code that TypeScript generates ( I don't know if this helps in a TS workflow, but with rollup-plugin-json you can do this... export { version } from './package.json';` ...and the rest of package.json will get tree-shaken. Maybe then you don't need that line in the deploy script at all? |
fix deep imports + tmp folder
https://packd.now.sh/bundle/apollo-client@1.0.0
I think this package works fine in Angular apps with Rollup.
The text was updated successfully, but these errors were encountered: