Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-commonjs

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-commonjs - npm Package Versions

1345

0.6.2

Diff

Changelog

Source

0.6.2 (2023-03-12)

  • enhancement: support node_modules | #19
caoxie
published 0.6.1 •

Changelog

Source

0.6.1 (2022-12-10)

  • b163947 v0.6.1
  • 232042f feat: cjs examples
  • 4ad7a9b fix: var instead const #17
- const module = { exports: {} }; const exports = module.exports;
+ var module = { exports: {} }; var exports = module.exports;
caoxie
published 0.6.0 •

Changelog

Source

0.6.0 (2022-11-27)

More like Vite, loose syntax!

0.6.x

const { foo } = require('foo')
↓
const { foo } = __CJS__import__0__.default || __CJS__import__0__
const bar = require('bar')
↓
import * as __CJS__import__0__ from '/bar'
const bar = __CJS__import__0__.default || __CJS__import__0__

0.5.x

const { foo } = require('foo')
↓
import { foo } from 'foo'
const bar = require('bar')
↓
import * as __CJS__import__0__ from '/bar'
const bar = __CJS__import__0__
Main commit
  • eda5464 v0.6.0
  • b5f7089 refactor!: loose syntax convert #15
caoxie
published 0.5.3 •

Changelog

Source

0.5.3 (2022-10-16)

  • ee0a882 src-output -> __snapshots__
  • 16593ff v0.5.3
  • 2a5752b docs: v0.5.3
  • 236730a refactor: use vite-plugin-utils
  • bb793a5 chore: update config
  • 1148671 feat: support "type": "module"
  • f590da1 chore: "strict": true
  • cf98458 bump deps
  • 04f95f7 chore: bump deps
  • 0434172 chore: update comments

caoxie
published 0.5.2 •

Changelog

Source

[2022-06-24] v0.5.2

  • a11aeaf test: v0.5.2
  • 83d9f3d docs: v0.5.2
  • b7e02cd refactor: move options.onFiles to options.dynamic.onFiles
caoxie
published 0.5.1 •

Changelog

Source

[2022-06-20] v0.5.1

  • 961cbb5 docs: v0.5.1
  • 1584867 chore: more exact RegExp
  • 82301e3 refactor: options.dynamic instead of options.depth
  • 3b471ad chore: comments
caoxie
published 0.5.0 •

Changelog

Source

[2022-06-16] v0.5.0

  • 04be6ad docs: v0.5.0
  • eeecebf test: v0.5.0
  • 0ddb4ed remove cjs-esm.ts
  • 1198cdc feat(v0.5.0): support dynamic require
  • ec74309 faet: const - KNOWN_ASSET_TYPES, KNOWN_CSS_TYPES, builtins
  • 4346d86 chore: comments
  • 9560e5b feat(v0.5.0): dynamic-require.ts
caoxie
published 0.4.7 •

Changelog

Source

[2022-05-13] v0.4.7

  • 4d44b15 vite-plugin-commonjs@0.4.7
  • a9ad902 test: v0.4.7
  • 095c40f chore: comments
  • 2dc2637 refactor: imporve generate-export
caoxie
published 0.4.6 •

Changelog

Source

[2022-05-12] v0.4.6

  • 6f8c1d6 refactor: better code
  • 3f7e008 fix(🐞): improve MagicString.overwrite()
caoxie
published 0.4.5 •

Changelog

Source

[2022-05-21] v0.4.5

  • e546cb7 docs: function-scope
  • 6d3c9d9 feat: 🚧-🐞 support function scope require()
  • 68add57 fix(🐞): re implementation overwrite()
  • abf41ed docs: v0.4.5
  • 9429f63 fix: check this.overwrites empty
  • 7075e03 fix: Bypass Pre-build
  • 2a66ff3 refactor: use utils.MagicString
  • e4173d3 feat: class MagicString
  • aa5b885 refactor: use utils.simpleWalk()
  • 94aa885 feat: simpleWalk()
  • 60135e4 fix: improve findtoplevelscope
  • 39f8505 chore: rename topLevelNode -> topScopeNode
  • 174b2d6 chore: update comment
  • aeebcab fix: filter node_modules
  • c5ae2c0 refactor: use utils.isCommonjs instead isCommonjs
  • 2a0f85a add utils.ts
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc