File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ < style >
2+ body {
3+ font-family : 'Lucida Grande' ;
4+ }
5+ </ style >
6+ < div id ="root "> </ div >
7+ < script src ="dist/main.js "> </ script >
Original file line number Diff line number Diff line change 1+ {
2+ "scripts" : {
3+ "start" : " npm run clean && npm run build && open index.html" ,
4+ "build" : " webpack --mode=development --no-devtool" ,
5+ "clean" : " rm -rf dist"
6+ },
7+ "devDependencies" : {
8+ "html-react-parser" : " ../../" ,
9+ "react" : " ^17.0.1" ,
10+ "react-dom" : " ^17.0.1" ,
11+ "webpack" : " ^5.18.0" ,
12+ "webpack-cli" : " ^4.4.0"
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ import parse from 'html-react-parser' ;
2+
3+ import ( 'react-dom' ) . then ( function ( ReactDOM ) {
4+ ReactDOM . render (
5+ parse ( '<h1>HTMLReactParser loaded with webpack</h1>' ) ,
6+ document . getElementById ( 'root' )
7+ ) ;
8+ } ) ;
You can’t perform that action at this time.
0 commit comments