Skip to content

Nested import handling #28

@jerekshoe

Description

@jerekshoe

When css is imported from modules that are being imported themselves, I'm uncertain if the order is as it should be. I'm coming from using css-loader with webpack, which from what I have seen handles css imports the same way that javascript imports are handled (i.e. each imported modules code/imports are executed recursively before the next import statement is handled). This seems to contradict #16, however, so I'm curious what the intended functionality is for this plugin.

Code

main.js

import './a.js';
import './a.css';

a.js

import './b.css';

a.css

body {
    background-color: red;
}

b.css

body {
    background-color: blue;
}

Expected Behavior (What I would expect)

bundle.css

body {
    background-color: blue;
}body {
    background-color: red;
}

Actual Behavior

bundle.css

body {
    background-color: red;
}body {
    background-color: blue;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions