Skip to content

fix: Removed node_modules/ prefix in vendor styles to be compatible with monorepos#1974

Open
Yann イーベス Eves (yanneves) wants to merge 1 commit intoministryofjustice:mainfrom
yanneves:fix/monorepo-compatibility
Open

fix: Removed node_modules/ prefix in vendor styles to be compatible with monorepos#1974
Yann イーベス Eves (yanneves) wants to merge 1 commit intoministryofjustice:mainfrom
yanneves:fix/monorepo-compatibility

Conversation

@yanneves

Identify the bug

Fixes #1781

Description of the change

One Forward (@forward) import in the govuk-frontend vendor dependency includes a superfluous node_modules/ prefix which makes assumptions on the location of dependencies and breaks monorepo support where dependencies are usually installed in the root directory, i.e. ../../node_modules/.

Alternative designs

n/a

Possible drawbacks

n/a

Verification process

Installed patched version locally.

Release notes

  • Resolved compatibility when installing in monorepos

… with monorepos

One @forward import in the govuk-frontend vendor dependency includes a superfluous `node_modules/` prefix which makes assumptions on the location of dependencies and breaks monorepo support where dependencies are usually installed in the root directory, i.e. `../../node_modules/`.

Fixes ministryofjustice#1781
@yanneves
Copy link
Author

just tagging you directly Chris Pymm (@chrispymm) in case this was missed

@chrispymm
Copy link
Contributor

Hi, thanks for this PR - I have a feeling we have tried to remove this before and it caused issues in Rails projects so I'll have to do a bit of further testing.

@yanneves
Copy link
Author

could see where Rails might trip up on this if it doesn't default to looking in node_modules/

have you been able to do any further testing? the patched version is creeping further into our build pipeline and feeling a bit fragile

@yanneves
Copy link
Author

hey Chris Pymm (@chrispymm), I notice there's a new beta release channel, would that be somewhere we could attempt this in case it's a breaking change? we're still unable to use the unpatched version in our monorepo

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.

Vite/Storybook 9: Sass @import + hard‑coded node_modules paths break build

2 participants