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

Fix silverback-website builds #490

Merged
merged 5 commits into from
Nov 25, 2020
Merged

Fix silverback-website builds #490

merged 5 commits into from
Nov 25, 2020

Conversation

Leksat
Copy link
Member

@Leksat Leksat commented Nov 25, 2020

Problem

TypeScript and Webpack fail to resolve @amazeelabs/gatsby-theme-core and @amazeelabs/react-di when they are not compiled.

Solution

Compile the mentioned packages during the monorepo initialization.

Solution which did not work

microsoft/TypeScript#21423 suggest a workaround:

// index.ts in root of each package
export * from './src/index'

It helps TypeScript, but does not work for webpack.

@Leksat Leksat force-pushed the see-if-it-fails-in-ci branch from f4e3530 to 4cb53ee Compare November 25, 2020 10:39
@Leksat Leksat force-pushed the see-if-it-fails-in-ci branch from 09b4f3d to 3faf7bf Compare November 25, 2020 10:50
@Leksat Leksat changed the title see if silverback-website build fails in CI Fix silverback-website builds Nov 25, 2020
@Leksat Leksat marked this pull request as ready for review November 25, 2020 11:18
@Leksat Leksat merged commit d0920a9 into development Nov 25, 2020
@Leksat Leksat deleted the see-if-it-fails-in-ci branch November 25, 2020 11:20
@Leksat
Copy link
Member Author

Leksat commented Nov 25, 2020

@pmelab FYI: I tried a workaround but it did not work. See the PR description.

@Leksat
Copy link
Member Author

Leksat commented Nov 25, 2020

@pmelab also I'm not sure if the newly added postinstall scripts will fire when packages are installed from NPM 🤔

@pmelab
Copy link
Contributor

pmelab commented Nov 28, 2020

@Leksat npm triggers the prepare script on local install as well as before publishing. We should make sure everything that has to be built does this on prepare.

@Leksat
Copy link
Member Author

Leksat commented Nov 30, 2020

@pmelab yes, npm does that. But yarn does not. It does not support all of npm hooks: https://yarnpkg.com/advanced/lifecycle-scripts

So the issue with local development is still open.

@Leksat
Copy link
Member Author

Leksat commented Nov 30, 2020

How about this? #494

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

Successfully merging this pull request may close these issues.

2 participants