CoffeeScript in an ESM Node Project: Check the Compiler Output First
Mixing CoffeeScript with Node ES modules fails on output format, not syntax. Compile one file, inspect it, then choose pre-compilation or the register hook.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Mixing CoffeeScript with Node ES modules fails on output format, not syntax. Compile one file, inspect it, then choose pre-compilation or the register hook.
Rollup wraps every bundled module, including the ES module entry point, in a function where this is undefined under strict mode. An entry point that references top-level this while expecting the global object then produces the documented THIS_IS_UNDEFINED warning, and the runtime binding stays undefined even when the warning is filtered out. The context and
CoffeeScript default CommonJS module output incompatible with ES‑module bundlers The CoffeeScript compiler (v1.x) emits CommonJS require and module.exports statements by default. Production builds that bundle the generated JavaScript with tools configured for ES modules (e.g., Webpack, Rollup) often encounter runtime errors such as Uncaught ReferenceError: m
Moving a local module-based project into a Pen I have a small front-end project that builds locally with Vite, where dependencies are imported using bare specifiers such as import _ from 'lodash' . I want to reproduce the same code as a CodePen Pen for sharing, but I am unclear which parts of the module workflow CodePen actually supports and which require re
Goal is to use Jasmine 5 native ES module support with package.json "type": "module" and a jasmine.json config file in both local development and CI pipelines. Jasmine 5 loads the config via dynamic import(). Node.js 18.19+ stabilizes ESM without flags, while Node 16/17 require --experimental-vm-modules for ESM config loading. The Jasmine CLI does not auto-d
Goal Diagnose a failed deployment that stops at build time when Bun’s bundler encounters a CommonJS module or a circular ES module dependency. Constraints Bun’s bundler accepts only ES modules; attempting to import a CommonJS module (e.g., require('fs') ) during bun build triggers a compile‑time error. Dynamic imports must use a literal string; import(module
Vite's development server defaults to binding `localhost` when no `server.host` value is provided in `vite.config.js`. This behavior aims to restrict access to the local machine during local development. However, the precise mechanism governing the default address resolution—and whether it can shift under certain configurations—remains a point of clarificati
Goal We want to load external JSON data with d3.json in a D3 v7 application that is bundled as ES modules and served from a subpath in production. The same code works fine on a local dev server. Constraints & Uncertainty D3 v7 ships only as named ES module exports; a global d3 object is no longer available unless a UMD build is explicitly loaded. Data re
Problem Context Swiper 8 introduced ES‑module distribution and required explicit registration of components such as Pagination and Navigation. A side effect of the loop‑mode refactor is that when slidesPerGroup is greater than one and the total number of slides is not a multiple of that group size, the automatic duplication of slides can leave a visual gap o