Update storybook and overhaul build system

Created on 11 February 2025, about 2 months ago

Problem/Motivation

Keeping storybook updated has been one of the major challenges in CivicTheme.
It relies heavily upon a variety of webpack plugins and has been extremely difficult in keeping these packages updated in a timely basis and understanding how to make updates to the build system.

Equally the build process has been too slow to build the SASS and storybook and to see the changes developers causing an inefficiency in the development process

We have decided to:

- Remove the existing gulp and storybok system
- Implement a new front-end build system with node using as few packages as possible
- Rebuild the storybook system to 8.5x using vite and the twig plugin (https://github.com/larowlan/vite-plugin-twig-drupal) with an eye to keeping storybook updated regularly

The process in building storybook and building CSS remains the same with `npm run storybook`, `npm run build`, `npm run dist` still being the commands
you will rely on.

The major difference you will notice is building CSS and storybook will be much, much less than before down from 20+ to under 10seconds (2seconds to rebuild CSS!).

The PR to be merged can be viewed at:
Theme
https://github.com/civictheme/monorepo-drupal/pull/1320

Feature request
Status

Active

Version

1.9

Component

Code

Created by

🇦🇺Australia RichardGaunt Melbourne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024