Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using package path for copyFiles() #1124

Open
dkarlovi opened this issue May 31, 2022 · 3 comments
Open

Allow using package path for copyFiles() #1124

dkarlovi opened this issue May 31, 2022 · 3 comments

Comments

@dkarlovi
Copy link

The bundle will register a path like this

"@symfony/ux-turbo": "file:vendor/symfony/ux-turbo/Resources/assets",

It would be nice to be able to use this in the copyFiles(), like so

Encore.
    .copyFiles({
        from: '@symfony/ux-turbo/css',
        to: 'css/[path][name].[hash:8].[ext]',
    });
@weaverryan
Copy link
Member

Does this not work? I'm guessing it doesn't... but I thought that it actually might. This feature makes sense to me, but copyFiles() is tricky. So if someone can make a PR to get this going, then awesome, 👍

@dkarlovi
Copy link
Author

dkarlovi commented Jun 1, 2022

@weaverryan since you assume it worked, I've re-tested it to make doubly sure, I did this:

{
    "dependencies": {
        "@sigwinhq/store-frontend": "file:vendor/sigwin/store-frontend-bundle/bundle/Resources/assets"
    }
}
$ ls vendor/sigwin/store-frontend-bundle/bundle/Resources/assets
controllers  css  icons  images  package.json
Encore
    .copyFiles({
        from: '@sigwinhq/store-frontend/icons',
        to: 'icons/[path][name].[hash:8].[ext]',
    })
$ npx encore prod
Running webpack ...

 WARNING  The "from" option of copyFiles() should be set to an existing directory but "@sigwinhq/store-frontend/icons" does not seem to exist. Nothing will be copied for this copyFiles() config object.

@carsonbot
Copy link

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants