Skip to content

Commit a755e5d

Browse files
committed
Retrieve content in script, style and pre tags
1 parent 733e35c commit a755e5d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rollup-plugin-html2",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "Rollup plugin to zip up emitted files.",
55
"homepage": "https://github.com/mentaljam/rollup-plugin-html2",
66
"repository": {

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ consider to use the esm format or switch off the option`)
248248
? template
249249
: fs.readFileSync(template).toString()
250250

251-
const doc = parse(data) as HTMLElement & {valid: boolean}
251+
const doc = parse(data, {
252+
pre: true,
253+
script: true,
254+
style: true,
255+
}) as HTMLElement & {valid: boolean}
252256
if (!doc.valid) {
253257
this.error('Error parsing template')
254258
}

0 commit comments

Comments
 (0)