Skip to content

Commit

Permalink
migrate from tsc and webpack to vite
Browse files Browse the repository at this point in the history
  • Loading branch information
nygardk committed Nov 18, 2023
1 parent 471510a commit d4c192a
Show file tree
Hide file tree
Showing 13 changed files with 1,695 additions and 3,658 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-walls-shake.md
@@ -0,0 +1,5 @@
---
"react-share": major
---

Compilation target is now ES2017 instead of ES5. The distributed files are built with Vite instead of TypeScript compiler.
3 changes: 1 addition & 2 deletions .gitignore
@@ -1,5 +1,4 @@
.DS_Store
node_modules/
lib/
es/
dist/
*.log
8 changes: 0 additions & 8 deletions demo/Root.tsx

This file was deleted.

12 changes: 12 additions & 0 deletions demo/index.html
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>react-share demo | Social media share buttons and share counts for React.</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/index.tsx"></script>
</body>
</html>
16 changes: 8 additions & 8 deletions demo/index.tsx
@@ -1,11 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom';
import Root from './Root';
import Demo from './Demo';
import './Demo.css';

const rootElement = document.createElement('div');

if (!document.querySelector('div')) {
document.body.appendChild(rootElement);
}

ReactDOM.render(<Root />, rootElement);
ReactDOM.render(
<React.StrictMode>
<Demo />
</React.StrictMode>,
document.getElementById('root'),
);

0 comments on commit d4c192a

Please sign in to comment.