Skip to content

Commit

Permalink
chore: add vitejs/vite#15851
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Feb 10, 2024
1 parent d955b92 commit b7d9566
Show file tree
Hide file tree
Showing 6 changed files with 498 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vite-15851-cjs-interop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
1 change: 1 addition & 0 deletions vite-15851-cjs-interop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/vitejs/vite/issues/15851
13 changes: 13 additions & 0 deletions vite-15851-cjs-interop/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/main.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions vite-15851-cjs-interop/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as paper from 'paper/dist/paper-core';
import paper2 from 'paper/dist/paper-core';

console.log([
paper.Color,
paper.__proto__,
paper.__proto__.Color,
paper2.Color,
paper2.__proto__,
paper2.__proto__.Color
])
15 changes: 15 additions & 0 deletions vite-15851-cjs-interop/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "vite-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"paper": "^0.12.17",
"vite": "5.1.0"
}
}
Loading

0 comments on commit b7d9566

Please sign in to comment.