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

ECMAScript Target missing for Example Tests #44

Closed
frank-weindel opened this issue Oct 6, 2023 · 0 comments · Fixed by #46
Closed

ECMAScript Target missing for Example Tests #44

frank-weindel opened this issue Oct 6, 2023 · 0 comments · Fixed by #46
Assignees
Labels
bug Something isn't working legacy browser support Feature/fix relates to supporting older browsers

Comments

@frank-weindel
Copy link
Collaborator

frank-weindel commented Oct 6, 2023

Currently the example tests have no defined ECMAScript / browser target so if you attempt to run them on a device running WPE 2.28 (for instance) errors like the following appear:

SyntaxError: Unexpected token '?'
SyntaxError: Unexpected token '='. Expected an opening '(' before a method's parameter list.

We need to define a target of ES2019 which is known to be supported by WPE 2.28.

In addition we need an easier way to run the production build of the examples. The dev build (via npm start) does not properly support the setting of a target. See this Vite issue and comment.

Proposal is to create an npm run prod command in the root that:

  1. Builds the library
  2. Builds the production version of the examples vite build
  3. Runs vite preview
@frank-weindel frank-weindel self-assigned this Oct 6, 2023
@frank-weindel frank-weindel added bug Something isn't working legacy browser support Feature/fix relates to supporting older browsers labels Oct 6, 2023
frank-weindel added a commit that referenced this issue Oct 6, 2023
Target set to ES2019 which seems to be supported by WPE 2.28.

Fixes #44
@frank-weindel frank-weindel linked a pull request Oct 6, 2023 that will close this issue
frank-weindel added a commit that referenced this issue Oct 6, 2023
- Fixes remaining issues when trying to run the Renderer on WPE 2.28 browser and possibly lower.
  - Tested on a production XG2v2 device.
  - For an application using the Renderer to work on this browser, its build target MUST be set to ES2019 or lower.
  - To run the Renderer Example Tests on legacy browsers, you must build/run the production version of the tests.
  - Fixes #43, #44, #45 
- Added `npm run prod` command to run the Example Tests in production mode (required to run the tests on legacy browsers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working legacy browser support Feature/fix relates to supporting older browsers
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant