Skip to content

[LiveComponent] Some fixes on JS dependencies assets #2940

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

Merged
merged 2 commits into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/LiveComponent/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"main": "dist/live_controller.js",
"types": "dist/live_controller.d.ts",
"config": {
"css_source": "styles/live.css"
"css_source": "src/live.css"
},
"scripts": {
"build": "tsx ../../../bin/build_package.ts .",
Expand All @@ -44,9 +44,6 @@
"@symfony/ux-live-component": "path:%PACKAGE%/dist/live_controller.js"
}
},
"dependencies": {
"idiomorph": "^0.3.0"
},
Comment on lines -47 to -49
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To resume, since idiomorph is inlined in our dist files and there is no more import ... from 'idiomorh' in them, then there is no point to make it a prod dependency, it should be a dev dependency instead.

"peerDependencies": {
"@hotwired/stimulus": "^3.0.0"
},
Expand All @@ -56,6 +53,7 @@
"@testing-library/jest-dom": "catalog:",
"@testing-library/user-event": "^13.1.9",
"@types/node-fetch": "^2.6.2",
"idiomorph": "^0.3.0",
"jsdom": "catalog:",
"node-fetch": "^2.6.1",
"tslib": "catalog:",
Expand Down
5 changes: 5 additions & 0 deletions src/LiveComponent/assets/src/live.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[data-loading=""],
[data-loading="show"],
[data-loading*="|show"] {
display: none;
}
3 changes: 0 additions & 3 deletions src/LiveComponent/assets/styles/live.css

This file was deleted.

Loading