infinum/eightshift-boilerplate

Theme can't load assets on alternative WordPress installation

sneakyvince opened this issue · 4 comments

I'm currently trying to use this theme on an alternative Bedrock installation but I'm running into the following problem:

The stylesheet https://localhost:3000/wp/wp-content/themes/eightshift-boilerplate/public/application.css/?ver=1.0.0 was not loaded because its MIME type, “text/html”, is not “text/css”.

I'm getting this error because the assets folder (public) is actually in:
https://localhost:3000/app/themes/eightshift-boilerplate/public

Is there a way to make this theme work with my alternative WordPress installation?

Hi @sneakyvince, unfortunately this was never tested in Bedrock as we don't use that and I seriously doubt anyone from our team will have time / drive to figure this out.

If you have the time it would be great if you could research what changes would need to be made for this to work and open a PR!

@sneakyvince You can try to do a custom Webpack build for Bedrock and fit the build process to your projects needs.
You can use this guide to get started with custom Webpack build: https://infinum.github.io/eightshift-docs/docs/advanced/webpack

@sneakyvince You can try to do a custom Webpack build for Bedrock and fit the build process to your projects needs.
You can use this guide to get started with custom Webpack build: https://infinum.github.io/eightshift-docs/docs/advanced/webpack

Wouldn't this be a problem somewhere inside the PHP code that loads these assets?

You are right. In that case, you would also need to extend Enqueue classes: https://infinum.github.io/eightshift-docs/docs/guides/enqueue to make everything work.