Skip to content

Fix CommonJS package entrypoint#12

Open
jamilahmadzai wants to merge 1 commit into
simonwep:masterfrom
jamilahmadzai:fix/commonjs-entrypoint
Open

Fix CommonJS package entrypoint#12
jamilahmadzai wants to merge 1 commit into
simonwep:masterfrom
jamilahmadzai:fix/commonjs-entrypoint

Conversation

@jamilahmadzai

Copy link
Copy Markdown

Fixes #11.

Summary

  • point the package main field at the CommonJS file produced by the existing build
  • point the CommonJS exports["."].require target at the same built file
  • keep the ESM import and types entries unchanged

Validation

  • corepack pnpm install --frozen-lockfile --ignore-scripts
  • corepack pnpm run build
  • node -e "const plugin = require('.'); console.log(Object.keys(plugin)); console.log(typeof (plugin.default || plugin.optimizeCssModules));"
  • npm pack --dry-run --ignore-scripts --json .
  • git diff --check

@simonwep

Copy link
Copy Markdown
Owner

Valid, but I do not endorse this practice of "microbounties" where everything from front-to-end is AI generated just for the sake of collecting contributions. It's just a lot of noise. Next time you'll be blocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CommonJS entrypoint points to missing dist/index.umd.cjs

2 participants