Skip to content

Commit f6e9168

Browse files
Update examples to load parser from the relative dist directory
This ensures the parser version (after running build) is valid because the cdn version is the most recently published one.
1 parent a48f0a3 commit f6e9168

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

examples/requirejs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<script>
1414
requirejs.config({
1515
paths: {
16-
'html-react-parser': 'https://unpkg.com/html-react-parser@latest/dist/html-react-parser.min',
16+
'html-react-parser': '../dist/html-react-parser.min',
1717
'react': 'https://unpkg.com/react@latest/dist/react.min',
1818
'react-dom': 'https://unpkg.com/react-dom@latest/dist/react-dom.min'
1919
}

examples/script-tag.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
<body style="padding: 50px">
88
<div id="root"></div>
99

10-
<!-- HTMLReactParser depends on React -->
10+
<!-- HTMLReactParser depends on React and ReactDOM -->
1111
<script src="https://unpkg.com/react@latest/dist/react.min.js"></script>
12-
<script src="https://unpkg.com/html-react-parser@latest/dist/html-react-parser.min.js"></script>
13-
14-
<!-- ReactDOM -->
1512
<script src="https://unpkg.com/react-dom@latest/dist/react-dom.min.js"></script>
13+
<script src="../dist/html-react-parser.min.js"></script>
14+
1615
<script>
1716
ReactDOM.render(
1817
HTMLReactParser(

0 commit comments

Comments
 (0)