Skip to content

Raw CSS on development environment #85

@kelvien

Description

@kelvien

I'm using webpack-flush-chunks version 2.0.3
I noticed these lines of code:

css: {
      toString: function toString() {
        return (
          // lazy-loaded in case not used
          DEV ? api.styles.toString() : '<style>' + stylesAsString(stylesheets, outputPath) + '</style>'
        );
      }
    }

Is there a particular reason why we are only showing raw CSS on non-DEV environment only? I just thought that it is better to return the raw CSS regardless of the environment. And use the exposed styles variable to get the linked stylesheets, the way it is now.
Doing this will make us see in dev as closely as possible with what we are going to see in production.

Thank you!

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