bug: Copy operation is not copying the file to a different file name
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
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
This seems to be a regression from https://github.com/ionic-team/stencil/issues/5899
Any plans on fixing this?
@Tallyb we would love to see this fixed, would you like to take a stab at this?