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

working with plugin assets is not working #335

Open
metapeace-dev opened this issue Apr 1, 2019 · 2 comments
Open

working with plugin assets is not working #335

metapeace-dev opened this issue Apr 1, 2019 · 2 comments

Comments

@metapeace-dev
Copy link

metapeace-dev commented Apr 1, 2019

Hi, I am trying to compress assets in both main webroot folder and plugin webroot folder.

webroot/assets/js/*.js => webroot/js/*.js
{plugin name}/webroot/assets/js/*.js => {plugin name}/webroot/js/*.js

the problem is that there is only one cachePath. so if main webroot assets work, then plugin assets don't work.
is there any way to build both assets at the same time?

@markstory
Copy link
Owner

is there any way to build both assets at the same time?

No there is only one output path. If you use the helper to link assets it shouldn't matter much though. Are your plugins generating assets with the same name?

@strohne
Copy link

strohne commented Nov 12, 2022

Hi...I had the same issue.

My problem is that js and css files in a plugin may contain paths to images and other resources that are relative to the plugin folder. When the build is saved inside the global WWW_ROOT, those paths break.

I suggest configs inside a plugin should have their own cachePath and their own web root. Then AssetCompressHelper->url() can use those paths.

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