Problem/Motivation

Currently, adding a new stylesheet or script requires manually editing vite.config.js to include it as an input.

It would be great if files under /src could be autodetected.

Proposed resolution

Modify vite configuration to automatically detect files under /src

Issue fork artisan-3570995

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alejandro cabarcos created an issue. See original summary.

frouco made their first commit to this issue’s fork.

frouco’s picture

Assigned: frouco » alejandro cabarcos
Status: Active » Needs review

Vite now automatically detects the .css files to be processed and discards the partial files (_name.css). If the file is placed in a folder, the folder structure will be duplicated in the output folder (dist).

alejandro cabarcos’s picture

Tested on a clean D11 installation and working.

Thanks fran

Merging into 2.x

  • frouco committed ac0fad40 on 2.x
    Issue #3570995: Autodetect .css files and respect the folders hierarchy...
alejandro cabarcos’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.