Skip to content

Does nothing. #306

@arthurwolf

Description

@arthurwolf

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions