vercel / vercel/ncc

Extending asset imports

Open
#352 4 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 currently use webpack directly on my project. I am interested in using this project but I have a raw-loader configured in my webpack.config.js to import *.sql$ files. E.g.

import SQL_TEMPLATE from './insert-rows.sql'
const statement = database.prepare(SQL_TEMPLATE)
statement.run(...)

Are there plans to change the default static asset imports? Or even default to importing unrecognizable extensions as strings?

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 with the webpack.config.js example and the raw-loader rule for *.sql files, then inspect how ncc currently handles static asset imports. Compare the existing behavior with the proposed string-import alternatives; done requires a decided default behavior and a scoped implementation plan for unrecognized extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.