Comments (4)
I've got this issue over here: symfony/flex#843
What I find really useful to do, in in my package.json I put packages that are for building the front-end in devDependencies, and then stuff that is used in the actual execution of the front-end in dependencies.
I agree. That is actually why the packages are added to devDependencies
. If you install something like ux-chartjs, its npm package is added to devDependencies
. That may seem incorrect at first, but that dependency only needs to be present during build. Encore uses it - at build time - to create the final, built CSS and JS files. That package does NOT need to be present at runtime. So, I think your philosophy is correct and the packages are already following it.
from ux.
friendly cc @tgalopin
from ux.
I see some similar behaviour every time I run composer update
the versions in package.json
are getting updated. for example, I have "symfony/ux-chartjs": "1.3.0"
installed so in package.json
there is the dependency written for chart.js
which I upgraded to a newer version
"chart.js": "3.6.0",
after running the composer command it is changed to
"chart.js": "^2.9.4",
would be nice if this change can somehow be avoided/suppressed
from ux.
I'm experiencing a related issue. I have a standard Symfony type app, which outputs HTML via Twig templates. I then use Webpack Encore to build the client side assets.
What I find really useful to do, in in my package.json
I put packages that are for building the front-end in devDependencies
, and then stuff that is used in the actual execution of the front-end in dependencies
.
Now I realise technically for my kind of build this is irrelevant, as it all gets built by Webpack and outputted to the build
directory anyway, presumably with whatever tree-shaking is needed to avoid getting the JS build tools in the final dist version.
However, I find it very useful to do this, as it distinguishes the two types of package.
Installing Symfony UX always adds stuff to the devDependencies
section, whereas it is all runtime stuff, so personally I would much prefer that it targetted the main dependencies
section instead.
Is there a good reason for adding to devDependencies
?
from ux.
Related Issues (20)
- [LiveComponent] Using a DTO for a search form HOT 4
- Bug: TypeError: Cannot read properties of undefined (reading '0') HOT 3
- [TwigComponent] Passing HTML to Components Via Blocks Is Not Possible With Variable Component Name HOT 2
- [Turbo] Doesn't work with entity that uses composite primary key
- [LiveComponent]ย Form submit ajax with multiple submit buttons
- [Turbo] Add `mercure()` to `turbo_stream_listen()` HOT 1
- [ExpressionLanguage] Add function `service` HOT 11
- [LiveComponent] LiveProps not correctly updated from PostMount after updateFromParent HOT 1
- [Twig Components] anonymous components in a vendor bundle ?? HOT 2
- [Turbo] Support for broadcasting page refreshes
- [StimulusBundle] twig_escape_filter notice fixed, please make a new release HOT 3
- [Bug]docker build failure after upgrade ux-live-component to v2.17.0 HOT 1
- [Turbo] Cannot access private property App\Entity\...
- [TwigComponent] Parent function does not work in the content of a twig component HOT 6
- [LiveComponent] [Autocomplete] Autocomplete with custom data endpoint not working in a live component HOT 4
- [LiveComponent] TailwindCSS and Flowbite HOT 5
- Icons - command is not defined HOT 4
- [Icons] Document the http-client requirement for commands
- [LazyImage] Support images from Symfony Asset HOT 3
- [TwigComponent] Tag a new release ? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ux.