Skip to content

Commit

Permalink
deps: upgrade example to use Parcel v2
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
agilgur5 committed Apr 20, 2022
1 parent e8573bf commit 756f7c0
Show file tree
Hide file tree
Showing 6 changed files with 10,633 additions and 19,025 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,7 +1,7 @@
### custom ###

# parcel cache
.cache/
.parcel-cache/
# build output
dist/
# test coverage output
Expand Down
2 changes: 1 addition & 1 deletion example/public/index.html
Expand Up @@ -4,6 +4,6 @@
</head>
<body>
<div id='container'></div>
<script src='../src/index.js'></script>
<script type='module' src='../src/index.js'></script>
</body>
</html>
2 changes: 1 addition & 1 deletion example/src/index.js
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'

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

import styles from './styles.module.css'
import * as styles from './styles.module.css'

class App extends Component {
state = { trimmedDataURL: null }
Expand Down

0 comments on commit 756f7c0

Please sign in to comment.