Skip to content

Commit 756f7c0

Browse files
committed
deps: upgrade example to use Parcel v2
- deps: remove postcss-modules as Parcel no longer needs it - this also fixes 20+ vulns in the devDeps - use a namespace import for the CSS modules as requested in the docs: https://parceljs.org/languages/css/#css-modules - Per Migration docs (https://parceljs.org/getting-started/migration/): - use `type='module'` in `<script>` tag - use `.parcel-cache` in gitignore instead of `.cache` - misc: Babel is no longer necessary, so might move Parcel into the example dir instead, as it doesn't have to share deps now? - getting warnings from Parcel now that the Babel config is a deopt, but that's being used by Rollup (also still very fast) - misc: add `--open` to Parcel CLI script so it opens in browser window automatically
1 parent e8573bf commit 756f7c0

File tree

6 files changed

+10633
-19025
lines changed

6 files changed

+10633
-19025
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### custom ###
22

33
# parcel cache
4-
.cache/
4+
.parcel-cache/
55
# build output
66
dist/
77
# test coverage output

example/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
</head>
55
<body>
66
<div id='container'></div>
7-
<script src='../src/index.js'></script>
7+
<script type='module' src='../src/index.js'></script>
88
</body>
99
</html>

example/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'
33

44
import SignaturePad from '../../src/index.tsx'
55

6-
import styles from './styles.module.css'
6+
import * as styles from './styles.module.css'
77

88
class App extends Component {
99
state = { trimmedDataURL: null }

0 commit comments

Comments
 (0)