Skip to content

Plugin transform required css #42

@windsonR

Description

@windsonR

importsString += `import * as ${packageName} from ${item[1].replace(/`/g, `'`)};\n`;

Plugin will transform require('./a.css') into import * as __require_for_vite_ygkiDV from './a.css';
In Vite 4.0.0, it will console a warning.Default and named imports from CSS files are deprecated. Use the ?inline query instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions