Skip to content

Commit

Permalink
Merge pull request #33 from vite-plugin/v0.8.2
Browse files Browse the repository at this point in the history
V0.8.2
  • Loading branch information
yejimeiming committed Jul 17, 2023
2 parents 647fe26 + 3598779 commit a0207e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.8.2 (2023-07-17)

- feat: update to ES2023 #32, closes [#32](https://github.com/vite-plugin/vite-plugin-commonjs/issues/32)

## 0.8.1 (2023-07-12)

- dfd8742 feat: generate sourcemap #28
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-commonjs",
"version": "0.8.1",
"version": "0.8.2",
"description": "A pure JavaScript implementation of CommonJs",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -133,7 +133,7 @@ async function transformCommonjs({

let ast: AcornNode
try {
ast = parseAst(code, { sourceType: 'module', ecmaVersion: 2020 }) as AcornNode
ast = parseAst(code, { sourceType: 'module', ecmaVersion: 14 }) as AcornNode
} catch (error) {
// ignore as it might not be a JS file, the subsequent plugins will catch the error
return null
Expand Down

0 comments on commit a0207e0

Please sign in to comment.