@@ -10,7 +10,10 @@ import {
1010} from "@code-features/assets" ;
1111import { BaseImageRepositories } from "@design-sdk/core/assets-repository" ;
1212import { k } from "@web-builder/core" ;
13- import { default_tokenizer_config } from "@designto/token/config" ;
13+ import {
14+ default_tokenizer_config ,
15+ TokenizerConfig ,
16+ } from "@designto/token/config" ;
1417import { default_build_configuration } from "@designto/config" ;
1518import { reusable } from "@code-features/component" ;
1619import assert from "assert" ;
@@ -52,7 +55,10 @@ export async function designToCode({
5255 }
5356
5457 // post token processing
55- let tokenizer_config = { ...default_tokenizer_config , id : input . id } ;
58+ let tokenizer_config : TokenizerConfig = {
59+ ...default_tokenizer_config ,
60+ id : input . id ,
61+ } ;
5662 if ( build_config . force_root_widget_fixed_size_no_scroll ) {
5763 tokenizer_config . custom_wrapping_provider = ( w , n , d ) => {
5864 if ( n . id === input . entry . id ) {
@@ -64,6 +70,15 @@ export async function designToCode({
6470 return false ;
6571 } ;
6672 }
73+
74+ if ( build_config . disable_detection ) {
75+ tokenizer_config . disable_detection = true ;
76+ }
77+
78+ if ( build_config . disable_flags_support ) {
79+ tokenizer_config . disable_flags_support = true ;
80+ }
81+
6782 const vanilla_token = tokenize ( input . entry , tokenizer_config ) ;
6883
6984 // post token processing for componentization
@@ -236,7 +251,10 @@ export async function designToVanilla({
236251 vanilla_config : config . VanillaFrameworkConfig ;
237252 asset_config ?: AssetsConfig ;
238253} ) : Promise < output . ICodeOutput > {
239- const vanillawidget = tovanilla . buildVanillaWidget ( input . widget ) ;
254+ const vanillawidget = tovanilla . buildVanillaWidget (
255+ input . widget ,
256+ vanilla_config
257+ ) ;
240258 const res = tovanilla . buildVanillaFile ( vanillawidget ) ;
241259
242260 // ------------------------------------------------------------------------
0 commit comments