jgthms / bulma

Modern CSS framework based on Flexbox
https://bulma.io
MIT License
49.14k stars 3.95k forks source link

Importing bulma in Nuxt 3 config css property causes super slow Vite startup #3604

Open ghost opened 1 year ago

ghost commented 1 year ago

This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework I'm using Bulma version [0.9.4] My browser is: NA This is a Sass issue: I'm using version [0.9.4] I am sure this issue is not a duplicate?

Description

When adding bulma to Nuxt modules, vite server starts up really slowly, up to a minute for some users. It has already been raised as Nuxt and Vite github issues but devs there have said bulma is the cause.

One interesting comment (https://github.com/nuxt/nuxt.js/issues/13824) says bulma uses old division code from Bootstrap, which is the underlying cause. Please investigate and issue fix if that is the case.

Steps to Reproduce

  1. Create new Nuxt project using npx nuxi init nuxt-test
  2. code nuxt-test
  3. yarn install
  4. Start vite server, it starts up within a few seconds
  5. yarn add bulma
  6. Add bulma to css property:
export default defineNuxtConfig({
  css: [
    'bulma',
  ]
})
  1. Start vite server using yarn dev -o now it takes anywhere from 20 seconds to a minute
  2. Take out bulma from css property and vite will start up in 3 seconds.

Please see https://github.com/vitejs/vite/issues/11221 and https://github.com/nuxt/nuxt.js/issues/13824

Expected behavior

Vite should start up quickly, as that is one of its major features.

Actual behavior

Vite starts up real slow (possibly due to some division loops within bulma code -- see description)

With bulma: image

Without: image

ghost commented 1 year ago

Anyone look at these issues?

dword-design commented 1 year ago

Same issue here!

Jeroen-Cox commented 1 year ago

Same issue!