node-version-assets icon indicating copy to clipboard operation
node-version-assets copied to clipboard

.js not included on some filenames

Open RichardEustace opened this issue 6 years ago • 1 comments
trafficstars

We have the following file that we are versioning

/public/javascripts/workLocationMap.min.js

It is included as follows

<script data-main="{{ asset_path }}/javascripts/workLocationMap.min.js" src="{{ asset_path }}/javascripts/lib/require-2.3.5.min.js"></script>

and when we version it the .js extension is not not included

<script data-main="{{ asset_path }}/javascripts/workLocationMap.min.8c6b35686201b3791828149ccd5fe142" src="{{ asset_path }}/javascripts/lib/require-2.3.5.min.js"></script>

If we change the name to /public/javascripts/mapWorkLocation.min.js works

<script data-main="{{ asset_path }}/javascripts/mapWorkLocation.min.8c6b35686201b3791828149ccd5fe142.js" src="{{ asset_path }}/javascripts/lib/require-2.3.5.min.js"></script>

We are versioning 23 files and this is the only one effected in this way

Our version code is

var version = async function(paths) {
  var assets = []

  paths.forEach(path => {
    files = glob.sync(path, {})
    files.forEach(file => assets.push(file))
  });

  var versionInstance = new Version({
    assets: assets,
    requireJs: true,
    keepOriginal: false,
    grepFiles: ['views/**/*.html']
  });

  return await versionInstance.run()
}

RichardEustace avatar Apr 24 '19 11:04 RichardEustace

I can't think why this is happening to be honest. Do you have any more debug info?

techjacker avatar Apr 28 '19 14:04 techjacker