-
Notifications
You must be signed in to change notification settings - Fork 9
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
Agnostic Runtime #953
Comments
superseded by #1008 |
Still need this, separate from adapting for hosting platforms and providers. |
So did some initial research on this by trying to "de" Node (🦕 ) WCC and while it seems However, it appears that
Thus, support for it is inconsistent
So we may need to support runtime adapters in the short term it seems 🤕 Some other related links |
Seems like a conversation around a standard |
BunDid a little testing with Bun 1.0. Got an error related to importing htmlparser 116 | async function trackResourcesForRoute(html, compilation, route) {
117 | const { context } = compilation;
118 | const root = htmlparser.parse(html, {
^
TypeError: htmlparser.parse is not a function. (In 'htmlparser.parse(html, {
script: !0,
style: !0
})', 'htmlparser.parse' is undefined)
at /Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/lib/resource-utils.js:118:15
at trackResourcesForRoute (/Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/lib/resource-utils.js:116:38)
at /Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/lifecycles/prerender.js:121:10
at /Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/lifecycles/prerender.js:107:37
at /Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/plugin-renderer-puppeteer/src/puppeteer-handler.js:19:18
at /Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/plugin-renderer-puppeteer/src/puppeteer-handler.js:13:23
at processTicksAndRejections (:1:2602) Made this change to the import and confirmed it worked in both Bun and Node and so was than able to succesfully build! // before
import htmlparser from 'node-html-parser';
// after
import * as htmlparser from 'node-html-parser'; However, it looks like the |
Not sure we'll be able to get this in for 1.0, so deferring to 1.x milestone. |
Type of Change
Feature
Summary
Would like to provide Greenwood with the ability to run on a broad spectrum of runtime environments, not just NodeJS. So for example, being able to run Greenwood in
This means more Web APIs like
fetch
,URL
, etc and lessfs
,path
, etc. So would like to make the core as agnostic as possible through and through, in preparation for Serverless / Edge cases as per #1008 and #948 .Details
Things to look out for would be what "Adapter" strategies for anything that is Node specific. This includes
fs
- alternatives toreadFile
,existsSync
,copy
, etc. Usefs.promises.*
so we can useURL
directlypath
- get rid of all instancesprocess.cwd()
- ???Readable.from
os
Also, will want to pull along WCC for this adventure too.
The text was updated successfully, but these errors were encountered: