question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML output is in a .js file

See original GitHub issue
  • I am interested in helping provide a fix!

Scope

  • This only impacts specific generators/outputs (please list them here):

Describe the bug

The html output target lands in a file with .js extension.

To Reproduce

yarn
yarn ci:build

Then look at packages/e2e-app/output/html/src/components/my-component.js

Expected behavior

HTML output in a .html file, or perhaps consider some other extension indicating it is meant to be included in other HTML? (.inc?), But not .js.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
PatrickJScommented, Jun 18, 2022

Ive been focusing on webcomponent only. Html output needs some work. It’s a little bit confusing what html output should be. Because i’s not webcomponent it does make sense to keep them .html files but they’re not exactly js components. I guess we could make our own component pattern too

0reactions
steve8708commented, Jun 21, 2022

yeah exactly, the initial thinking was this is useful for very simple things. so can support basic HTML output, event listeners, data bindings. so is useful for codegen for things like Builder. not necessarily sure how it could or ever would child components tho, that is the main known constraint right now

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript Output - W3Schools
JavaScript can "display" data in different ways: Writing into an HTML element, using innerHTML . Writing into the HTML output using document.write() ....
Read more >
Print result of JS file in html - javascript - Stack Overflow
So I have an html file with the following ...
Read more >
[JavaScript Intro] How to See Your Code Output? - Finxter
When the JavaScript file is opened, we press CTRL + ALT + N on Windows ...
Read more >
How to add a JavaScript file in HTML? - Linux Hint
To add an external JavaScript file in your HTML document, assign the link of your file to the src attribute in the <script>...
Read more >
Read from and write to HTML document - w3resource
Since JavaScript has become an integrated part of the Front End Development, you must learn how to read from and write to an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found