From b122c728eb4f7b248410b0e23cabe5f077e6b293 Mon Sep 17 00:00:00 2001 From: insistence <3055204202@qq.com> Date: Thu, 20 Nov 2025 15:44:16 +0800 Subject: [PATCH] perf: keep the content of the built entry index.html file up-to-date --- dash_vite_plugin/utils.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dash_vite_plugin/utils.py b/dash_vite_plugin/utils.py index 22c6ea1..db4e7d9 100644 --- a/dash_vite_plugin/utils.py +++ b/dash_vite_plugin/utils.py @@ -345,16 +345,10 @@ def init(self) -> Self: if self.is_cli: logger.info('⚙️ Creating index.html file...') - if not os.path.exists(self.index_html_path): - if self.is_cli: - logger.info( - f'🔍 index.html file {self.index_html_path} not found. Creating default index.html file...' - ) - - self.create_default_index_html() + self.create_default_index_html() - if self.is_cli: - logger.info(f'💾 Default index.html file created at: {self.index_html_path}') + if self.is_cli: + logger.info(f'💾 Default index.html file created at: {self.index_html_path}') if not self._check_npm_init(): init_cmd = [self.npm_path, 'init', '-y']