Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cjs extension for cjs entrypoint #72

Merged
merged 2 commits into from
Jul 12, 2023

Commits on Jul 11, 2023

  1. fix: Use cjs extension for cjs entrypoing

    By using `"type": "module"` all cjs code needs to end with the correct
    extension. Currently trying to use parsel-js as cjs results in this
    error
    
    ```
    ReferenceError: require is not defined in ES module scope, you can use import instead
    This file is being treated as an ES module because it has a '.js' file extension and '/home/lingga/selector-lint/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
        at file:///home/lingga/selector-lint/test.js:1:16
        at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
        at async Promise.all (index 0)
        at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
        at async loadESM (node:internal/process/esm_loader:91:5)
        at async handleMainPromise (node:internal/modules/run_main:65:12)
    ```
    ling1726 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    83388a2 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Configuration menu
    Copy the full SHA
    2b149ac View commit details
    Browse the repository at this point in the history