vercel / vercel/ncc

Packaging HTML files as assets

Open
#295 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

I'm bundling a Lambda function using the @now/node-server builder. The function uses the fs to render some template (.html) files. Because it doesn't explicitly require them in the code, they get ignored and are not bundled within the function. Would it be possible to use the "asset" feature of ncc to package them explicitly with the function?

Thank you very much!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing ncc's existing asset feature and how the @now/node-server builder invokes the bundle. Trace how HTML files loaded through fs are discovered or omitted, then define a reproducible Lambda example showing the expected packaged assets. Done means explicitly handled HTML assets are present in the generated function and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.