Skip to content

bug: Copy operation is not copying the file to a different file name #5956

@momenelkamri

Description

@momenelkamri

Prerequisites

Stencil Version

4.21.0

Current Behavior

according the following stenciljs config:

outputTargets: [
    {
      type: 'dist',
      esmLoaderPath: '../loader',
      copy: [{
        src: 'global.scss',
        dest: 'styles/webcomponents.css',
      }],
    },
    {
      type: 'dist-custom-elements',
      customElementsExportBehavior: 'auto-define-custom-elements',
      externalRuntime: false,
    },
    {
      type: 'docs-readme',
    },
    {
      type: 'www',
      serviceWorker: null, // disable service workers
      copy: [{
        src: 'global.scss',
        dest: 'build/styles/webcomponents.css',
      }],
    },
  ],

global.scss is copied into the styles/webcomponents.css folder.

Expected Behavior

global.scss should be copied and renamed to the styles/webcomponents.css file

System Info

No response

Steps to Reproduce

run npm run build
check dist or www folder
You will find that global.scss is not renamed to webcomponents.css but put inside webcomponents.css folder

Code Reproduction URL

https://github.com/momenelkamri/steniljs-test-issue

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions