Skip to content

lezama/wp-build-pnpm-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wp-build pnpm test

Tests @wordpress/build with pnpm strict hoisting (hoist-pattern=[]).

The problem

With pnpm strict hoisting, packages are only accessible from where they are declared. The build tool must resolve packages from the importing file's context, not from the root.

Structure

root/                           # no wordpress deps here
  packages/my-utils/
    package.json                # has @wordpress/data
    index.ts
  routes/example/
    package.json                # has @wordpress/notices, uses @test/my-utils
    stage.tsx                   # imports from both

Test

pnpm install
pnpm build
cat build/routes/example/content.min.asset.php

Should list wp-data and wp-notices. If either is missing, the fix does not work.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published