Skip to content

Commit 4f540c0

Browse files
committed
chore: phoenix_vite pr got merged, so we can take out conditional logic
1 parent 977cf0c commit 4f540c0

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

lib/mix/tasks/ash_typescript.install.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ if Code.ensure_loaded?(Igniter) do
136136
# The install function modifies the project, so we need to start fresh
137137
# but preserve our args
138138
Igniter.Util.Install.install(
139-
[{:phoenix_vite, "~> 0.4.0"}],
139+
[{:phoenix_vite, "~> 0.4.2"}],
140140
install_args,
141141
igniter
142142
)
@@ -1574,8 +1574,6 @@ if Code.ensure_loaded?(Igniter) do
15741574
end
15751575

15761576
# Create spa_root.html.heex layout for vite + react (includes React Refresh preamble)
1577-
# TODO: Remove __ENTRY_FILE__ dev/prod split in Vite layout templates once
1578-
# https://github.com/LostKobrakai/phoenix_vite/pull/24 is merged. Otherwise keep as is.
15791577
defp create_spa_root_layout(igniter, web_module, "vite", framework)
15801578
when framework in ["react", "react18"] do
15811579
app_name = Igniter.Project.Application.app_name(igniter)

priv/templates/install/spa_root_vite.html.heex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="csrf-token" content={get_csrf_token()} />
77
<.live_title default="AshTypescript">Page</.live_title>
88
<PhoenixVite.Components.assets
9-
names={[if(PhoenixVite.Components.has_vite_watcher?(__WEB_MODULE__.Endpoint), do: "js/index.js", else: "__ENTRY_FILE__"), "css/app.css"]}
9+
names={["__ENTRY_FILE__", "css/app.css"]}
1010
manifest={{:__APP_NAME__, "priv/static/.vite/manifest.json"}}
1111
dev_server={PhoenixVite.Components.has_vite_watcher?(__WEB_MODULE__.Endpoint)}
1212
to_url={fn p -> static_url(@conn, p) end}

priv/templates/install/spa_root_vite_react.html.heex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</script>
1616
<% end %>
1717
<PhoenixVite.Components.assets
18-
names={[if(PhoenixVite.Components.has_vite_watcher?(__WEB_MODULE__.Endpoint), do: "js/index.js", else: "__ENTRY_FILE__"), "css/app.css"]}
18+
names={["__ENTRY_FILE__", "css/app.css"]}
1919
manifest={{:__APP_NAME__, "priv/static/.vite/manifest.json"}}
2020
dev_server={PhoenixVite.Components.has_vite_watcher?(__WEB_MODULE__.Endpoint)}
2121
to_url={fn p -> static_url(@conn, p) end}

0 commit comments

Comments
 (0)