Skip to content
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

build fails in webpack/creact react app because webpack can't find the precompiled code #49

Closed
r3wt opened this issue Feb 7, 2019 · 3 comments

Comments

@r3wt
Copy link

r3wt commented Feb 7, 2019

create react app disallows compiling code from outside the source directory, so it relies on modules to provide their code transpiled to es5 or whatever. for some reason this isn't working with your package for @tryghost/content-api. i am looking for a work around to get my build working again. i don't know much about this, if you can offer any insight i would appreciate it.

for now i am working around it by copying lib/index.js directly to my project src, so it can be compiled.

@r3wt r3wt changed the title build fails in webpack/creact react app because there is no precompiled version build fails in webpack/creact react app because webpack can't find the precompiled code Feb 7, 2019
@ErisDS
Copy link
Member

ErisDS commented Feb 8, 2019

@r3wt can you provide exact reproduction steps please?

@r3wt
Copy link
Author

r3wt commented Feb 8, 2019

@ErisDS I take it you don't have experience with create-react-app?

basically to reproduce just:

  1. create a project with create react app
  2. install this package
  3. add an import of the module into the src for the new app
  4. try to build the app with npm run build. it will fail because webpack can't find the umd build for some reason.

@kevinansfield
Copy link
Contributor

Hi @r3wt 👋 Can you try upgrading to the new 1.2.0 version to see if that works? I tracked down the issue and left a more extensive writeup here if you're interested #67 (comment)

naz pushed a commit to naz/Ghost-SDK that referenced this issue Sep 24, 2020
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
naz pushed a commit to naz/Ghost-SDK that referenced this issue Sep 28, 2020
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
naz pushed a commit to naz/Ghost-SDK that referenced this issue Sep 28, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants