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

section chunking by removing from main bundle #359

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

prashant-fynd
Copy link
Collaborator

No description provided.

src/lib/Theme.ts Outdated Show resolved Hide resolved
src/lib/Theme.ts Outdated

// Define the regular expression for disallowed patterns
const disallowedPatterns = /[\.,_]|sections|section|\d/;
Copy link
Collaborator

Choose a reason for hiding this comment

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

add validations for special characters as well

src/lib/Theme.ts Outdated Show resolved Hide resolved
src/lib/Theme.ts Outdated Show resolved Hide resolved
src/lib/Theme.ts Outdated

let fileNames = fs
.readdirSync(`${process.cwd()}/theme/sections`)
.filter((o) => o !== 'index.js' && o !== 'sectionsSettings.json');
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be required now sectionsSettings

src/lib/Theme.ts Outdated Show resolved Hide resolved
@@ -1148,8 +1159,8 @@ export default class Theme {
typeof options['ssr'] === 'boolean'
? options['ssr']
: options['ssr'] == 'true'
? true
: false;
? true
Copy link
Collaborator

Choose a reason for hiding this comment

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

nested ternary operator not required?

@@ -1198,13 +1209,20 @@ export default class Theme {
typeof options['hmr'] === 'boolean'
? options['hmr']
: options['hmr'] == 'true'
? true
: false;
? true
Copy link
Collaborator

Choose a reason for hiding this comment

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

nested ternary operator is not requred

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.

3 participants