Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(packages/sui-bundler): add flag for creating libs with css chunks #1738

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

NietoGX
Copy link

@NietoGX NietoGX commented Mar 14, 2024

Description

This PR adds an option to the sui-bundler build lib for generating CSS chunks.

By default the code will not use chunks for the css. With the option --chunk-css will use the css with chunks.

Example

sui-bundler lib umd/index.js -o umd/ --root --chunk-css will generate a chunk for each css file.
For example, if we want to select a different scss file from the js with code like:

switch (site) {
    case 'fotocasa':
      import('./fotocasa.scss')
      break
    case 'cochesnet':
      import('./motor.scss')
      break
    case 'motosnet':
      import('./motor.scss')
      break
    case 'milanuncios':
      import('./milanuncios.scss')
      break
    case 'infojobs':
      import('./milanuncios.scss')
      break
    default:
      import('./index.scss')
  }

The sui-bundler will generate the next files:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants