-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
My inline file is:
const { inlineSource } = require('inline-source');
const fs = require('fs');
const path = require('path');
const htmlpath = path.resolve('dist/pack.html');
inlineSource(htmlpath, {
compress: true,
rootpath: path.resolve('www'),
})
.then((html) => {
// Do something with html
console.log(html);
})
.catch((err) => {
// Handle error
});
My html file is:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="favicon.ico">
<script src='/dist/workers/electrum-worker-dist.js'></script>
<script src='/dist/workers/address-search-worker-dist.js'></script>
<title>Test</title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Running the script does absolutely nothing. The html it outputs is exactly the same as the source, nothing is inlined.
What am I doing wrong?
Metadata
Metadata
Assignees
Labels
No labels