SShortSingh.
Back to feed

Static Hosts Can Silently Break JSON Import Attributes in Browsers

0
·3 views

A developer found that importing a JSON file with the with { type: 'json' } attribute worked locally but threw an error after deployment, even though the code was unchanged. The feature lets the module loader treat a JSON file as data rather than code, and it has shipped in Chrome, Firefox, and Safari, though Baseline does not yet count it as widely available. The article warns that the older assert syntax is now non-standard and that named imports from JSON modules are not valid, since JSON offers only a default export. The real cause of the failure, the article explains, lies in how the hosting server responds to the request, particularly the content-type header it sends back.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Longer AI replies can add $600 a month to a 100,000-request API budget

A support assistant handling 100,000 monthly requests, each with 1,000 input tokens, would see its budget shift significantly if average replies grow from 200 to 600 tokens. At Claude Sonnet 4.5 standard rates of $3 per million input tokens and $15 per million output tokens, input costs stay at $300 per month. Output costs rise from $300 to $900, pushing the total from $600 to $1,200. The example excludes caching, retries, and batch discounts. The author, who runs the TokenCostHub calculator, suggests teams substitute their own logged average output tokens to estimate real spending.

0
ProgrammingDEV Community ·

Developer Builds Planner Generator That Mechanically Verifies Its Print-Ready PDFs

A developer describes a planner generator that renders pages from a small config using Pillow, so every page is produced by the same code. Verification runs as a separate step, using pdfinfo to confirm the 8.5×11 page size and page count, and checking that daily pages run sequentially with weekly reviews and a habit grid in the right places. A visual contact sheet is then reviewed by eye for clipping, overlap, and margin issues that scripts cannot detect. Running the builder on a college focus planner config produced a 19-page interior that passed these checks. The author notes this proves a working production workflow, not that any planner will sell, and offers a free sample and the builder skill as downloads.

0
ProgrammingDEV Community ·

Databricks Adds REPLACE USING Flows for Reloading Snapshots by Key

Databricks has made REPLACE USING flows generally available as of December 1, 2026, letting teams swap out a slice of a table in one statement. Some source systems deliver full snapshots for a single slice of data, such as one store's inventory, and these flows let the target treat that snapshot as the new truth. The flow replaces only rows matching the snapshot's key columns and leaves other slices untouched. The guide walks through building a store inventory table from snapshot files in a volume, and compares the approach with hand-written MERGE statements and AUTO CDC. It requires Databricks Runtime 18.2 or later, with Unity Catalog and streaming reads as prerequisites.

0
ProgrammingDEV Community ·

Plugin Adds Four Verification Gates to Coding Agent Task Completion

A developer built dsh-task-suite, a DeepSeek Harness plugin, to address the problem of trusting an AI coding agent's claim that a task is finished. Backlog items are stored as files, and the main session only dispatches tasks to background subagents that start with fresh context each time. Before a task advances, it must pass four machine checks: a one-time nonce match, commit ownership verification, a baseline test re-run, and an audit for weakened tests. Passing these gates only marks a task as ready for human verification, not as fully shipped. The author shares the plugin's repository and landing page and asks users for feedback through issues.