Skip to content

Component built with --target lib does not persist styles when imported #1504

@MartinPeverelli

Description

@MartinPeverelli

Version

3.0.0-beta.15

Reproduction link

https://github.com/MartinPeverelli/reproduction-app

Steps to reproduce

  • git clone git@github.com:MartinPeverelli/reproduction-app.git
  • npm run install
  • npm run serve

What is expected?

Title on screen should be red, because imported component ReproductionModuleTranspiled has scoped styles defining its text to be red.

What is actually happening?

Title on screen is black, styles are not being applied from imported module


Component ReproductionModuleTranspiled is here: https://github.com/MartinPeverelli/reproduction-module-transpiled
Was built using vue-cli-service build --target lib src/main.js and has .env.production with VUE_CLI_CSS_SHADOW_MODE = true
The generated dist files do indeed contain the scoped css, but it is not being applied when the component is imported on the main app.

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