Open adamziel opened 1 year ago
Actually, there already exists a version of WordPress Playground that fulfills all those criteria. It's the web version.
An isomorphic version of wp-now would be really useful here for features like mode detection and wp-cli support. Or two packages like wp-now/web
and wp-now/node
, much like we do with php-wasm. But a single isomorphic package sounds much better and easier to maintain.
This is also relevant for the browser extension:
https://github.com/WordPress/wordpress-playground/discussions/316
The VS Code extension doesn't work on vscode.dev:
The documentation explains:
The guide lists a number of restrictions. We are affected by at least those:
That's an easy fix – just add
require('vscode')
where it's missing.wp-now
and other packages in this repo use node modules extensively and would have to be refactored. Not sure how involved would that be yet. Technically, there could be a@wp-playground/runtime
module or so that would expose runtime-specific versions of these libraries.The extension calls
worker = new Worker(__dirname + '/worker.js');
. I'm not sure if that's okay.Once
wp-now
supports Blueprints, it will usefetch()
. I'm worried about the CORS part, though. I don't see any blockers for WordPress.org to support it for the downloads we need (WordPress core, plugins, themes), but it may take some time and attention from the systems team.cc @sejas @danielbachhuber @dmsnell @wojtekn