-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does nothing. #306
Comments
I figured out I needed to add "inline" to the tags, but now that I have added that, I get zero output. no error, nothing. |
The next code should be fine inline.jsconst { inlineSource } = require('inline-source');
const path = require('path');
const htmlpath = path.resolve('./dist/pack.html');
(async () => {
try {
html = await inlineSource(htmlpath, {
compress: false,
attribute: false,
ignore: ['ico'],
});
console.log(html);
} catch (err) {
console.error(err);
}
})(); pack.htmlPathes were changed. <!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="./workers/address-search-worker-dist.js"></script>
<script src="./workers/electrum-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> The files tree├── dist
│ ├── pack.html
│ └── workers
│ ├── address-search-worker-dist.js
│ └── electrum-worker-dist.js
└── inline.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My inline file is:
My html file is:
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?
The text was updated successfully, but these errors were encountered: