Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

plugin-css requires a fresh builder instance each time #102

@arackaf

Description

@arackaf

Hi Guy. I'm seeing what I think is a bug. Essentially, the plugin-css requires a fresh builder instance each time. If you create bundles with css dependencies on the same builder instance, some lines seem to get crossed, and css ends up in incorrect places.

Specifically, consider

for (let name of namesToOptimize) {
    let builder = new Builder('../' + baseDirectory);
    builder.config(configToUse);

with calls to

await builder
          .bundle(`${name}`, outputPath, configToUse)
          .then(result => {

below, inside the loop body. If I move

let builder = new Builder('../' + baseDirectory);
builder.config(configToUse);

above the for loop, the problems described above surface.

Is this expected behavior? Do you need me to repro this somewhere in GitHub?

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