Skip to content

cjs option needed #3

@cooperwfloyd

Description

@cooperwfloyd

Currently, this only outputs modules, but we need cjs support for projects that aren't using "type": "module" in package.json.

Getting this error in local on Windows:

Uncaught SyntaxError: Cannot use import statement outside a module at <unknown> (file://d/:\KNI\f2\landing-site\frontend\node_modules\optically-size-images\dist\react\index.js:1) at internalCompileFunction (node:internal/vm:128:18) at wrapSafe (node:internal/modules/cjs/loader:1280:20) at Module._compile (node:internal/modules/cjs/loader:1332:27) at Module._extensions..js (node:internal/modules/cjs/loader:1427:10) at Module.load (node:internal/modules/cjs/loader:1206:32) at Module._load (node:internal/modules/cjs/loader:1022:12) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:179:18) at optically-size-images/react (file://d/:\KNI\f2\landing-site\frontend\.next\server\pages\template-default\[[...id]].js:2110:18) at __webpack_require__ (

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions