-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Error (@tryghost/content-api/lib/index) Expected identifier on IE 11 #67
Comments
How are you doing the import and resulting transpilation? The ES module version of the library is written with ES6 so it's expected that it will be transpiled with babel etc to work with your chosen browser/environment targets. |
@kevinansfield Thanks for the prompt response! Answering your question I have a react application using webpack and babel. One other thing I realized was that on my The |
Yep, the code is not being transpiled to es5, I believe this has to do with this issue: rollup/rollup-plugin-babel#260 I solve the problem for now by adding baseConfig[0].module.rules.push({
test: /\.jsx?$/,
exclude: [/node_modules\/(?!(@tryghost)\/).*/],
loaders: ['babel-loader'],
} Please consider this on the next release. Let me know what you think and I will make a PR 😉 |
If you're pulling this module into a webpack build it will actually look at the I've updated our rollup config across our isomorphic packages so that we generate an Please try upgrading to the new 1.2.0 version and let me know how it goes 😄 |
Thanks @kevinansfield, it worked! |
closes TryGhost#49, closes TryGhost#67 - ensures our UMD builds are correctly transpiled for wide browser support including any necessary polyfills - adds ES builds with the same transpilation and polyfills as the UMD build, referenced under the "module" config in package.json for use in projects with build environments
closes TryGhost#49, closes TryGhost#67 - ensures our UMD builds are correctly transpiled for wide browser support including any necessary polyfills - adds ES builds with the same transpilation and polyfills as the UMD build, referenced under the "module" config in package.json for use in projects with build environments
closes TryGhost#49, closes TryGhost#67 - ensures our UMD builds are correctly transpiled for wide browser support including any necessary polyfills - adds ES builds with the same transpilation and polyfills as the UMD build, referenced under the "module" config in package.json for use in projects with build environments
Issue Summary
I'm having the following error:
Error?(@tryghost/content-api/lib/index) error Expected identifier
on IE 11, when using the content api. I see that the lib is very well maintained so I'm opening this issue.To Reproduce
@tryghost/content-api
import GhostContentAPI from '@tryghost/content-api';
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
Technical details:
The text was updated successfully, but these errors were encountered: