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

PRO-6775: External frontend support, docs cleanup #4799

Merged
merged 7 commits into from
Nov 8, 2024

Conversation

myovchev
Copy link
Contributor

@myovchev myovchev commented Nov 8, 2024

Summary

  • Fixes a bug that crashes external frontend applications.
  • Adds asset module option options.modulePreloadPolyfill (default true) to allow disabling the polyfill preload for e.g. external front-ends.
  • Adds bundleMarkup to the data sent to the external front-end, containing all markup for injecting Apostrophe UI in the front-end.
  • Fixes a false positive warning for module not in use for project level submodules (e.g. widges/module.js) and dot-folders (e.g. .DS_Store).
  • Stylelint fix provided in the config: Remove temporary a non-fixable deprecated warning stylelint-config-apostrophe#26
  • Fix eslint warnings: Eslint autofix - object shorthand #4800

What are the specific steps to test this change?

External front-ends should work.

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Copy link

linear bot commented Nov 8, 2024

@myovchev myovchev requested a review from boutell November 8, 2024 13:07
Copy link
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please stabilize eslint-config-apostrophe in that module, not here

.eslintrc Outdated Show resolved Hide resolved
.stylelintrc Outdated Show resolved Hide resolved
@@ -98,6 +98,10 @@ module.exports = {
// Force the HMR WS port when it operates on the same process as Apostrophe.
// Most of the time you won't need to change this.
hmrPort: null,
// Let the external build module inject a pollyfill for the module preload,
// adding the `modulepreload` support for the browsers that don't support it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What browsers don't support it? Curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's widely supported now. But I'm just following the Vite standards and defaults: https://vite.dev/config/build-options.html#build-polyfillmodulepreload

@myovchev myovchev requested a review from boutell November 8, 2024 14:25
@myovchev myovchev merged commit a966c53 into main Nov 8, 2024
9 checks passed
@myovchev myovchev deleted the PRO-6775-external-frontend branch November 8, 2024 14:59
haroun added a commit that referenced this pull request Nov 11, 2024
* main:
  fix vue warnings (#4797)
  Pro 6694 breakpoint preview vite ready (#4789)
  Resolve yaml dependency conflicts (#4801)
  PRO-6775: External frontend support, docs cleanup (#4799)
  sort glob result (#4796)
  HMR condition argument and widget player fix (#4794)
  fix permission grid tooltip display (#4792)
  Fix extra bundle detection (#4791)
  release 4.9.0 (#4788)
  Pro 6535 revision (#4787)
haroun added a commit that referenced this pull request Nov 12, 2024
* main:
  changelog (#4802)
  fixes modals deep selectors (#4795)
  fix vue warnings (#4797)
  Pro 6694 breakpoint preview vite ready (#4789)
  Resolve yaml dependency conflicts (#4801)
  PRO-6775: External frontend support, docs cleanup (#4799)
  sort glob result (#4796)
  HMR condition argument and widget player fix (#4794)
  fix permission grid tooltip display (#4792)
  Fix extra bundle detection (#4791)
  release 4.9.0 (#4788)
  Pro 6535 revision (#4787)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants