Skip to content

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