DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Node.js Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
easy
Node.js
Which of these correctly forces a file to be treated as CommonJS regardless of the package.json "type" field?
A
Naming it anything.js
B
Giving it the .cjs extension
C
Adding "use commonjs" at the top
D
There's no way to override package.json's type field per-file
Check Answer