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

V0.9.0 #36

Merged
merged 2 commits into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.8.2 (2023-08-26)

- 49e77ca chore: update test
- 61a9fe5 chore: code format
- c1e1ceb feat: support advanced import rules option

#### PR

- @Jinjiang feat: support advanced import rules option #35

## 0.8.2 (2023-07-17)

- feat: update to ES2023 #32, closes [#32](https://github.com/vite-plugin/vite-plugin-commonjs/issues/32)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-commonjs",
"version": "0.8.2",
"version": "0.9.0",
"description": "A pure JavaScript implementation of CommonJs",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/__snapshots__/exports.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* [vite-plugin-commonjs] export-runtime-S */ var module = { exports: {} }; var exports = module.exports; /* [vite-plugin-commonjs] export-runtime-E *//* [vite-plugin-commonjs] import-hoist-S */ import * as __CJS__import__0__ from './dynamic'; /* [vite-plugin-commonjs] import-hoist-E */
/* [vite-plugin-commonjs] export-runtime-S */ var module = { exports: {} }; var exports = module.exports; /* [vite-plugin-commonjs] export-runtime-E *//* [vite-plugin-commonjs] import-hoist-S */ import * as __CJS__import__0__ from "./dynamic"; /* [vite-plugin-commonjs] import-hoist-E */
const { hello, world } = __CJS__import__0__.default || __CJS__import__0__

// ❌ `exports` exported members are dynamic.
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/__snapshots__/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* [vite-plugin-commonjs] import-hoist-S */ import * as __CJS__import__0__ from './exports'; /* [vite-plugin-commonjs] import-hoist-E */const { msg: message } = __CJS__import__0__.default || __CJS__import__0__;
/* [vite-plugin-commonjs] import-hoist-S */ import * as __CJS__import__0__ from "./exports"; /* [vite-plugin-commonjs] import-hoist-E */const { msg: message } = __CJS__import__0__.default || __CJS__import__0__;
import cjs from "./cjs";
document.querySelector("#app").innerHTML = `
<pre>
Expand Down