I am working on the new theme using webpack building css and js. There is no problems to work with styling sass/css, but the theme doesn't read js files after builded webpack. Is there way to get this?
I am trying to use packages and modules from the npm registry to generate the css and js needed for my theme. I use webpack to manage packages and get .css and .js output files. According to the developer documentation https://docs.backdropcms.org/documentation/creating-sub-themes I need to add files style sheets [all] [] = mystyle.css
and scripts [] = myscript.js
to the .info file. And it works correctly for both of them if I use a standalone js file. But the js file I get as output from webpack is not. This works for Drupal 9, so I thought it might work for Backdrop too. Let me know if I'm wrong.
Posted5 days 18 hours ago by (indigoxela) in Weekly Meetings
Recent comments
Thanks so much! It's working now:
I was able to transfer the docroot files to the containing directory without the need for a second database or any manual configuration export/import/sync...
Ah, I see. Sorry, I hadn't clicked the link and assumed it was the instructions for upgrading from Drupal 7.
If you are simply copying a site from one location on a server to another, the...
Thanks for the quick reply, laryn.
No features, no Drupal: I built the source site in Backdrop in a subdirectory of the target directory under the same user home directory on the same...
This doesn't sound right -- when the upgrade completed, did you export the post-upgrade configuration into the staging folder (and commit that to the repo if you are using a git-based workflow...
Comments
I am not sure that I understand the question?
Are you building a new theme for Backdrop?
Can you provide a little more information about the specifics of your problem?
I am trying to use packages and modules from the npm registry to generate the css and js needed for my theme. I use webpack to manage packages and get .css and .js output files. According to the developer documentation https://docs.backdropcms.org/documentation/creating-sub-themes I need to add files
style sheets [all] [] = mystyle.css
and
scripts [] = myscript.js
to the .info file. And it works correctly for both of them if I use a standalone js file. But the js file I get as output from webpack is not. This works for Drupal 9, so I thought it might work for Backdrop too. Let me know if I'm wrong.