File tree Expand file tree Collapse file tree 4 files changed +739
-11
lines changed Expand file tree Collapse file tree 4 files changed +739
-11
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ import { Widget as IdWidget } from '@ncwidgets/id'
66import { Widget as FileRelationWidget } from '@ncwidgets/file-relation'
77import { createWidget as createReorderWidget } from '@ncwidgets/reorder'
88
9- const h = React . createElement . bind ( React )
10-
119const 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 ( ) )
Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff 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 ? j s $ / ,
19+ exclude : / n o d e _ m o d u l e s / ,
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 ( [ {
You can’t perform that action at this time.
0 commit comments