stencil icon indicating copy to clipboard operation
stencil copied to clipboard

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

Open momenelkamri opened this issue 1 year ago • 3 comments

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

momenelkamri avatar Aug 28 '24 09:08 momenelkamri

This seems to be a regression from https://github.com/ionic-team/stencil/issues/5899

christian-bromann avatar Aug 28 '24 15:08 christian-bromann

Any plans on fixing this?

Tallyb avatar Oct 08 '24 09:10 Tallyb

@Tallyb we would love to see this fixed, would you like to take a stab at this?

christian-bromann avatar Oct 08 '24 14:10 christian-bromann