bug: `extTransformsPlugin` is outputting collections css files

Open
#3,305 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
build-system

Research direction

Start by cloning the linked reproduction and running yarn followed by yarn build; inspect the extTransformsPlugin build path and the referenced stencil.config.ts. Done means the build no longer creates the externalcollection CSS output while preserving the expected dist output.

Written by the indexing model from the issue text.

Description

Resolution: Refine
Prerequisites
Stencil Version

v2.14.2 πŸ˜ƒ

Current Behavior

When building a dist output with a collection dependency, the dependencies css files will be outputted as part of the collection output, however, they appear further up the file tree due to their relative file paths. These css files aren't needed needed for the collection.

image

Expected Behavior

The css files aren't outputted.

Steps to Reproduce

Clone https://github.com/George-Payne/extTransformsPlugin-bug-reproduction

yarn is being used for workspaces, npm wont work

  1. yarn
  2. yarn build

Observe:

collectionconsumer
β”œβ”€β”€ dist
β”‚   β”œβ”€β”€ cjs
β”‚   β”œβ”€β”€ collection
β”‚   β”œβ”€β”€ collectionconsumer
β”‚   β”œβ”€β”€ esm
β”‚   β”œβ”€β”€ index.cjs.js
β”‚   β”œβ”€β”€ index.js
β”‚   β”œβ”€β”€ loader
β”‚   └── types
β”œβ”€β”€ externalcollection    <------------- This folder should not be outputted
β”‚   └── dist
β”‚       └── collection
β”‚           └── components
β”‚               └── ext-component
β”‚                   └── ext-component.css
β”œβ”€β”€ node_modules
β”œβ”€β”€ package.json
β”œβ”€β”€ src
β”œβ”€β”€ stencil.config.ts
└── tsconfig.json
Code Reproduction URL

https://github.com/George-Payne/extTransformsPlugin-bug-reproduction

Additional Information

No response

Dominant language
TypeScript
Stars
13.1k
Forks
855
Avg merge
4h 7m
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up β€” it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stenciljs/core

All issues in stenciljs/core

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.