Skip to content

Commit 334821f

Browse files
authored
chore(project): update examples to parcel 2 (#10310)
1 parent 30327e6 commit 334821f

File tree

27 files changed

+19667
-24662
lines changed

27 files changed

+19667
-24662
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ css
1717

1818
# Cache folders
1919
.cache
20+
.parcel-cache
2021

2122
# Logs
2223
logs
633 KB
Binary file not shown.

packages/colors/examples/preview/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<link rel="stylesheet" href="./styles.scss">
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<link href="./styles.scss" rel="stylesheet">
10+
<script src="./src/index.js" type="module"></script>
1011
</head>
1112
<body>
1213
<div id="root"></div>
13-
<script src="./src/index.js"></script>
1414
</body>
1515
</html>

packages/colors/examples/preview/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"private": true,
44
"version": "0.0.0",
55
"license": "Apache-2.0",
6+
"browserslist": "last 2 versions",
7+
"source": "index.html",
68
"scripts": {
7-
"build": "parcel build -d build --public-url \"/colors/examples/preview\" index.html",
9+
"build": "parcel build --dist-dir build --public-url \"/colors/examples/preview\" index.html",
810
"develop": "parcel index.html --no-cache"
911
},
1012
"devDependencies": {
11-
"@babel/core": "^7.10.1",
12-
"@babel/preset-env": "^7.10.1",
13-
"parcel-bundler": "^1.12.4"
13+
"@parcel/transformer-sass": "^2.0.1",
14+
"parcel": "^2.0.1"
1415
},
1516
"dependencies": {
1617
"react": "^16.13.1",

packages/colors/examples/preview/src/index.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,3 @@ function render(element) {
77
}
88

99
render(<App />);
10-
11-
if (module.hot) {
12-
const NextApp = require('./components/App').default;
13-
module.hot.dispose(() => {
14-
render(<NextApp />);
15-
});
16-
}

0 commit comments

Comments
 (0)