Skip to content

Issue with manifest helper #110

@cloudgrayau

Description

@cloudgrayau

Hello,

My vite has created the following manifest for the "contact.ts" file -

[src/js/cloudgray/contact.ts] => Array
        (
            [file] => contact-C8wg2vO6.js
            [name] => contact
            [src] => src/js/cloudgray/contact.ts
            [isEntry] => 1
            [css] => Array
                (
                    [0] => css/contact-0lYyfA-G.css
                )

            [integrity] => sha384-mAMvh4ahhWbShSa7PdvzJcbGY2cjaSqH3rTVz30HyB0SfFUMZvLUO7ZQU4a5ic71
        )

Calling {{ craft.vite.entry('contact.css') }} for example, doesn't work because the manifest helper is creating the key for this CSS file as 'contact-0lYyfA', rather than just 'contact'. I assume this is because it has 2 "-" in the CSS filename that is generated in the manifest.

The contact.ts file is as follows:

import '/src/css/cloudgray/contact.scss'
import '/src/css/cloudgray/plugins/nice.scss'
import NiceSelect from "nice-select2"
(function(window) {
/* code here */
});

I have fixed this by moving the nice.scss import as a @use instead in the contact.scss file, but regardless it might be worth looking at in-case someone else runs into this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions