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

fix: uniform client features enablement #1587

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

KermanX
Copy link
Member

@KermanX KermanX commented May 11, 2024

This PR uniforms the feature enablement, and fixes that disabled features were displayed on the context menu

Copy link

netlify bot commented May 11, 2024

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit cbc1e35
🔍 Latest deploy log https://app.netlify.com/sites/slidev/deploys/6659d9611fa456000878fbfb
😎 Deploy Preview https://deploy-preview-1587--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

const DrawingControls = shallowRef<any>()
if (drawingEnabled)
import('../internals/DrawingControls.vue').then(v => DrawingControls.value = v.default)

const WebCamera = shallowRef<any>()
const RecordingDialog = shallowRef<any>()
if (__SLIDEV_FEATURE_RECORD__) {
if (features.record) {
Copy link
Member

Choose a reason for hiding this comment

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

The reason we use the flag and static replacement is for tree-shaking. When the feature is disabled, the corresponding module should not be shipped to user's client bundle at all because Rollup will remove if (false) {}

Is the new approach still behaviours like that?

@KermanX KermanX marked this pull request as draft May 25, 2024 10:53
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