Why do you add node_modules to static #1901
-
I am inspecting and assessing Tailwind Elements for use in Django Step 5 on https://tailwind-elements.com/docs/standard/integrations/django-integration/ TE_URL = 'node_modules/'
STATICFILES_DIRS = [
BASE_DIR / "static",
BASE_DIR.parent / "node_modules",
] Why? I normally exclude node_modules from my repos/production commit/transfer to deploys, and allow the host (heroku buildpack) build to regenerate the node if needed (on heroku). However, why node_modules in static? Also if I use Cloundinary, and collectstatic, what happens? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! Most likely (since I cannot open my django project for some reason) it was added because django didn't want to import the css and js files of the We also have cdns for our package, so you can try using them aswell in your app: |
Beta Was this translation helpful? Give feedback.
Hi! Most likely (since I cannot open my django project for some reason) it was added because django didn't want to import the css and js files of the
tw-elements
package, so if it's working for you without addingnode_modules
to static then it's fine.We also have cdns for our package, so you can try using them aswell in your app:
https://cdn.jsdelivr.net/npm/tw-elements/dist/js/tw-elements.umd.min.js
https://cdn.jsdelivr.net/npm/tw-elements/dist/css/tw-elements.min.css