Skip to content

Commit

Permalink
Avoid vite build-lib to create .cjs file for umd
Browse files Browse the repository at this point in the history
This prevents unpkg to serve this file as text
  • Loading branch information
pgiraud committed Aug 9, 2022
1 parent 193d098 commit 5493b84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ open it in your favorite internet browser.

```html
<script src="https://unpkg.com/vue@3.2.37/dist/vue.global.prod.js"></script>
<script src="https://unpkg.com/pev2/dist/pev2.umd.cjs"></script>
<script src="https://unpkg.com/pev2/dist/pev2.umd.js"></script>
<link
href="https://unpkg.com/bootstrap@4.5.0/dist/css/bootstrap.min.css"
rel="stylesheet"
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"name": "pev2",
"version": "1.3.2",
"type": "module",
"homepage": "https://github.com/dalibo/pev2",
"license": "PostgreSQL license",
"files": [
"dist"
],
"main": "./dist/pev2.umd.cjs",
"module": "./dist/pev2.js",
"main": "./dist/pev2.umd.js",
"module": "./dist/pev2.mjs",
"exports": {
".": {
"import": "./dist/pev2.js",
"require": "./dist/pev2.umd.cjs"
"import": "./dist/pev2.mjs",
"require": "./dist/pev2.umd.js"
},
"./dist/style.css": "./dist/style.css"
},
Expand Down

0 comments on commit 5493b84

Please sign in to comment.