Skip to content

refactor(core): move implementation source into package#11041

Open
asturur wants to merge 7 commits into
masterfrom
move-sources-step4
Open

refactor(core): move implementation source into package#11041
asturur wants to merge 7 commits into
masterfrom
move-sources-step4

Conversation

@asturur

@asturur asturur commented Jul 8, 2026

Copy link
Copy Markdown
Member

Move core source ownership into packages/core/src so @fabricjs/core builds from its own workspace source instead of depending on the root implementation layout.

  • Move the current core implementation tree from root src/* into packages/core/src/* and move fabric.ts exports into packages/core/src/index.ts.
  • Update package imports, tsconfig paths, rolldown inputs, and build/package scripts so @fabricjs/core builds like a normal workspace package.
  • Keep the root entrypoints as compatibility facades for now and preserve existing import/export names and behavior.
  • Remove the special core dist staging flow and point package smoke/build expectations at the package-owned source and output.
  • Stack this PR on top of fix(config): resolve device pixel ratio through env #11040; this should merge after that PR lands, then be retargeted or rebased onto master.

related to #10894

@codesandbox

codesandbox Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@asturur

asturur commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

This was more complicated than i thought, and i need to test it properly.
I don't think i want to maintain the old import { Canvas } from 'fabric' as soon as this one is ready. Too much noise in my opinion

@Smrtnyk

Smrtnyk commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This was more complicated than i thought, and i need to test it properly. I don't think i want to maintain the old import { Canvas } from 'fabric' as soon as this one is ready. Too much noise in my opinion

we could release new major and say what are the new entrypoints?

Base automatically changed from divide-packages-more-step3 to master July 8, 2026 09:08
@asturur

asturur commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

This was more complicated than i thought, and i need to test it properly. I don't think i want to maintain the old import { Canvas } from 'fabric' as soon as this one is ready. Too much noise in my opinion

we could release new major and say what are the new entrypoints?

I think we want to do at least one last version in which i publish both, so i test everything ends up being the same, before putting out a new major i want to be sure all examples on fabricjs.com import from the new package, so i m confident things just work

@asturur
asturur marked this pull request as ready for review July 8, 2026 13:19
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Build Stats

file / KB (diff) bundled minified
fabric 777.084 (+2.933) 293.659 (+0.004)

@asturur

asturur commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@Smrtnyk this is fully broken i had an hard week and couldn't look into it, i hope i can do this weekend so i unblock the repo.

@Smrtnyk

Smrtnyk commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

@Smrtnyk this is fully broken i had an hard week and couldn't look into it, i hope i can do this weekend so i unblock the repo.

no worries, I noticed that build is red and that you have to do more changes
just put my approval as a signal that I am watching the progress on 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.

2 participants