Skip to content

[bug] HTML <template> element empty when serving bundled files #4410

Closed

Description

@ptrcnull

Describe the bug

When build.devPath is a path to a directory, <template> elements are empty despite having contents in the source files:

<!-- ... -->
<template>
	<tr>
		<td class="id"></td>
		<td class="desc"></td>
	</tr>
</template>
<script src="common.js"></script>
<!-- ... -->

image

Reproduction

No response

Expected behavior

No response

Platform and versions

Environment
  › OS: Alpine Linux 3.16.0 X64
  › Node.js: 16.15.0
  › npm: 8.12.1
  › pnpm: Not installed!
  › yarn: 1.22.19
  › rustup: Not installed!
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0
  › @tauri-apps/api [NPM]: 1.0.1
  › tauri [RUST]: 1.0.0,
  › tauri-build [RUST]: 1.0.0,
  › tao [RUST]: 0.11.2,
  › wry [RUST]: 0.18.3,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: ../dist

App directory structure
  ├─ dist
  ├─ node_modules
  ├─ .git
  └─ src-tauri

Stack trace

No response

Additional context

No response

Activity

  1. lucasfernog commented on Jun 20, 2022

    @lucasfernog
    Member

    Seems like webkit2gtk custom URI doesn't support templates :/ you'll need to use https://github.com/tauri-apps/tauri-plugin-localhost/

  2. alainschneble commented on Jan 29, 2023

    @alainschneble
    Contributor

    Seems like webkit2gtk custom URI doesn't support templates :/ you'll need to use https://github.com/tauri-apps/tauri-plugin-localhost/

    Not sure if webkit2gtk was the culprit here, unless I'm missing something. See #6165 and proposed fix #6166.

  3. FabianLars commented on Jan 29, 2023

    @FabianLars
    Member

    @alainschneble This issue was fixed in #5247 after we realized that it's not a webkitgtk specific issue (3 months later). The dev server you fixed in your PR wasn't a thing back then.

  4. alainschneble commented on Jan 29, 2023

    @alainschneble
    Contributor

    ter we realized that it's not a webkitgtk specific issue (3 months later). The dev server you fixed in your PR wasn't a thing back then.

    Ok thanks, now I see!

  5. added a commit that references this issue on Dec 9, 2024
    aec5537
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions