-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
🙋 How about php files? #262
Comments
Do you expect Parcel to just copy them over like they are html or really process and execute them as php? |
Just copy like html and parse entry points of course :) I have my own local server, that executes php. But optional execution php may be the nice feature. |
this is just a matter of registering |
It is if it’s about just html but if the point is decently supporting it than it’s bit more complex. Sent with GitHawk |
absolutely, but what would decently supporting them be? a php dev server? that seems out of scope |
Seems more like a plugin to me, thats why i labeled it help wanted |
I don't think a plugin is even needed, I can't think of any special bundling that could be performed for php that wouldn't be already performed by HTMLAsset. correct me if i'm wrong. The only thing is the php would not execute on the current They can use Provided php is a registered HTML extension |
Oh, of course, other referenced php files wouldn't be copied without special treatment. i'm a fool |
Feel free to test out your approach and do a PR @chee |
Hey there, I can't seem to wrap my head around on how to get it to work in wordpress build, am I wrong in my thinking that this parcel could be a good solution in this instance? |
i have built a plugin that works with very, very simple php programs (ones that only ever include/require files with relative string paths, or @devanflaherty which part of a wordpress build would you hope to use it for? what job would parcel be doing? i haven't used a bundler along with a wordpress application, and i'm not sure where it fits in. |
I'd also like to know if it's possible to use Parcel with WordPress. My use case is simple: I just want to split my scripts.js file into multiple files and bundle them together into a script that gets called in a wp_enqueue_script function. I hate the fact that I have to use Webpack for that. |
@ivanjuras of course! you can use your |
Closing. If you want to add support for php somehow, feel free to write a plugin! |
@ivanjuras I imagine this is way old to reply to you, but just to let you know, you can use gulp for what you want to do with wordpress and it's way easier than webpack for that limited level of bundling needed. I actually skipped gulp to learn webpack because it's supposed to be the future, and it does work, but gulp handles php stuff much easier. If you like, I'd recommend this article on the subject: https://www.sitepoint.com/fast-gulp-wordpress-theme-development-workflow/ |
I wrote a plugin for that: |
Thanks for this plugin, I was worried I couldn't use PHP with Parcel, so thanks a bunch! |
Just now I have project on my local server with php files( form handlers ). If I run Parcel on watch mode, php files not copying to dist folder and browser is not reload if I change those files.
🤔 Expected Behavior
I want from Parcel to reload browser( and index.php too ), when I change php files and copy them to dist folder.
😯 Current Behavior
The files not copying to dist folder, and browser not reloading, when I change php files.
The text was updated successfully, but these errors were encountered: