Skip to content

--next and v1.10.x doesn't import css #2292

@peterpeterparker

Description

@peterpeterparker

Stencil version:

v1.9.x with --next or >= v1.10.x

I'm submitting a:
[X] bug report

Current behavior:
With the new compiler, CSS aren't imported anymore. In our code highlighter component is use both sass() and postcss plugins. In the sass file I specify the following import:

@import "~prismjs/themes/prism.css";

which until v.1.9.x with --legacy compiler had for effect to include (import) the related css into the bundle.

with the new compiler, the CSS code isn't imported anymore. I found many occurrences of @import "~prismjs/themes/prism.css"; in my dist folder where actually I should find none but rather the effective CSS code.

Steps to reproduce:

Use https://github.com/deckgo/deckdeckgo/tree/master/webcomponents/highlight-code

Play with the @stencil/core version.

Config:

plugins: [
    sass(),
    postcss({
      plugins: [autoprefixer()]
    })
  ]

stencil/postcss": "^1.0.1",
stencil/sass": "^1.1.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions