wingsuit-designsystem / wingsuit

Twig for Storybook
GNU General Public License v2.0
93 stars 16 forks source link

Webpack - drupal, postcss and wingsuit (support request) #180

Closed jowan closed 3 years ago

jowan commented 3 years ago

New to webpack, so bare with me.

I have customised (putting it kindly) the following files:

/wingsuit.config.js added a new rules/module for webfonts file-loader

/node_modules/@wingsuit-designsystem/core/dist/server/presets/drupal.js a few customisations, dropped the CSS file support and changed the vendor folder location

/node_modules/@wingsuit-designsystem/preset-scss/dist/index.js a few customisations, made a fixed entry for main.scss and then dynamic support for x.styles.scss

The two second hacks are within function webpack(appConfig) { and I think the first one is the allowed webpack overrides method (?).

Question : can I migrate these changes in to a single place ? At the moment I'm using a patch, which is fine, but I would like to know how to do this properly for maintainability. The customizations are about exporting to Drupal.

Thanks for your help

christianwiedemann commented 3 years ago

Hi, you could easily create your own preset. You need an own app type. In this app type you can load your configure your presets.

Here the pages preset as example:

https://github.com/wingsuit-designsystem/wingsuit/blob/next/presets/pages/src/index.ts