set explicit comparisions for feature envvars so js can properly optimize

This commit is contained in:
Aaron Qian 2022-11-11 17:44:02 -08:00 committed by Aaron Qian
parent cd2914ca9c
commit a18f4c3b8d
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
7 changed files with 17 additions and 13 deletions

View file

@ -1,27 +1,27 @@
if (process.env.FEATURE_VIDEOPLAYER) {
if (process.env.FEATURE_VIDEOPLAYER === '1') {
import('./videoplayer');
}
if (process.env.FEATURE_TOC) {
if (process.env.FEATURE_TOC === '1') {
import('./toc');
}
if (process.env.FEATURE_DARKMODE) {
if (process.env.FEATURE_DARKMODE === '1') {
import('./darkmode');
}
if (process.env.FEATURE_FLOWCHART) {
if (process.env.FEATURE_FLOWCHART === '1') {
import('./flowchart');
}
if (process.env.FEATURE_SYNTAXHIGHLIGHT) {
if (process.env.FEATURE_SYNTAXHIGHLIGHT === '1') {
import('./syntaxhighlight');
}
if (process.env.FEATURE_MATH) {
if (process.env.FEATURE_MATH === '1') {
import('./math');
}
if (process.env.FEATURE_EMBEDPDF) {
if (process.env.FEATURE_EMBEDPDF === '1') {
import('./embedpdf');
}