Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pgksite: dev mode doesn't actually serve non-minified JS #42540

Open
eliben opened this issue Nov 12, 2020 · 2 comments
Open

x/pgksite: dev mode doesn't actually serve non-minified JS #42540

eliben opened this issue Nov 12, 2020 · 2 comments

Comments

@eliben
Copy link
Member

@eliben eliben commented Nov 12, 2020

The usage of ./cmd/frontend says:

  -dev
    	enable developer mode (reload templates on each page load, serve non-minified JS/CSS, etc.)

However, from some experimentation this doesn't appear to be happening. If I modify a .js file and re-run the frontend, the modification is not applied until I compile the .js file into a minified version with ./devtools/compile_js.sh.

Perhaps I'm holding it wrong?

A quick look at the code makes me believe this indeed isn't implemented. While in devMode the server calls parsePageTemplates anew each time a template is requested, the template files directly refer to minified JS, e.g.:

  <script>
    loadScript("/static/js/playground.min.js");
  </script>
@gopherbot gopherbot added this to the Unreleased milestone Nov 12, 2020
@eliben
Copy link
Member Author

@eliben eliben commented Nov 12, 2020

Related to #40960

@cagedmantis cagedmantis changed the title x/pgksite: --dev mode doesn't actually serve non-minified JS x/pgksite: dev mode doesn't actually serve non-minified JS Nov 13, 2020
@jamalc jamalc modified the milestones: Unreleased, pkgsite/frontend Nov 16, 2020
@jamalc
Copy link
Member

@jamalc jamalc commented Nov 16, 2020

Thanks for bringing this up, we definitely want to tackle this as part of #40960. More detailed plans coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants