Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions reflex/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,22 +1246,20 @@ def add_save_task(
path = utils.resolve_path_of_web_dir(output_path)
if path in output_mapping:
console.warn(
f"Path {path} has two different outputs. The first one will be used."
f"Path {path} has two different outputs. The last one will be used."
)
else:
output_mapping[path] = code
output_mapping[path] = code

for plugin in config.plugins:
for static_file_path, content in plugin.get_static_assets():
path = utils.resolve_path_of_web_dir(static_file_path)
if path in output_mapping:
console.warn(
f"Plugin {plugin.__class__.__name__} is trying to write to {path} but it already exists. The plugin file will be ignored."
)
else:
output_mapping[path] = (
content.decode("utf-8") if isinstance(content, bytes) else content
f"Plugin {plugin.__class__.__name__} is overwriting existing files at {path}."
)
output_mapping[path] = (
content.decode("utf-8") if isinstance(content, bytes) else content
)

for plugin_name, file_path, modify_fn in modify_files_tasks:
path = utils.resolve_path_of_web_dir(file_path)
Expand Down
Loading