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

Suggested way to build when ready for production? #40

Open
paridigm opened this issue May 23, 2023 · 1 comment
Open

Suggested way to build when ready for production? #40

paridigm opened this issue May 23, 2023 · 1 comment

Comments

@paridigm
Copy link

I know that HTML and JavaScript are parsed & edited on every request for those content-types, and that this library is intended for use in development context to facilitate build-free testing/iteration as opposed to in a high volume production web server.

However, I was wondering if there is a suggested way to go about building/converting frontend files (with the same translated paths found in development) when ready for production?

Thanks in advanced!

PS
Awesome library! It works like a charm! 😃 I found it at https://lit.dev/docs/ssr/client-usage/.

@paridigm
Copy link
Author

paridigm commented May 23, 2023

I suppose you could always use a traditional bundle tool like webpack and target a single entry JavaScript file that imports all the modules you'd ever want to use on the client... So, perhaps this might be a silly question 🤔.

I was thinking about somehow utilizing the underlying logic of koa-node-resolve, iterating through all client-side HTML and JavaScript files, translating them using said underlying logic, then copying the resulting files in a build/ directory.

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

No branches or pull requests

1 participant