Skip to content

Commit 8913da9

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 8292600 + 596544a commit 8913da9

File tree

4 files changed

+739
-11
lines changed

4 files changed

+739
-11
lines changed

packages/playground/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { Widget as IdWidget } from '@ncwidgets/id'
66
import { Widget as FileRelationWidget } from '@ncwidgets/file-relation'
77
import { createWidget as createReorderWidget } from '@ncwidgets/reorder'
88

9-
const h = React.createElement.bind(React)
10-
119
const loadData = async (dataPath) => {
1210
const data = await fetch(dataPath)
1311
.then(data => data.json())
@@ -40,7 +38,7 @@ const CMS = () => {
4038
cms.init()
4139
})
4240

43-
return h('div', { id: 'nc-root' })
41+
return <div id="nc-root"></div>
4442
}
4543

46-
render(h(CMS), createRoot())
44+
render(<CMS />, createRoot())

packages/playground/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@
1616
"test": "echo \"Error: no test specified\" && exit 1"
1717
},
1818
"author": "",
19-
"license": "ISC"
19+
"license": "ISC",
20+
"devDependencies": {
21+
"@babel/core": "^7.5.5",
22+
"@babel/preset-env": "^7.5.5",
23+
"@babel/preset-react": "^7.0.0",
24+
"babel-loader": "^8.0.6"
25+
}
2026
}

packages/playground/webpack.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ module.exports = {
1212
filename: 'bundle.js',
1313
},
1414
devtool: 'eval-source-map',
15+
module: {
16+
rules: [
17+
{
18+
test: /\.m?js$/,
19+
exclude: /node_modules/,
20+
use: {
21+
loader: 'babel-loader',
22+
options: {
23+
sourceType: 'module',
24+
presets: [
25+
['@babel/preset-env', { targets: { esmodules: true }}],
26+
'@babel/preset-react'
27+
],
28+
}
29+
}
30+
}
31+
],
32+
},
1533
plugins: [
1634
new HtmlPlugin(),
1735
new CopyPlugin([{

0 commit comments

Comments
 (0)