balena-supervisor/remove-hashbang-loader.js
Pablo Carranza Velez 1790939046 Use webpack to join all modules
This saves around 13MB in the resulting uncompressed docker image.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-11 14:01:16 -07:00

7 lines
319 B
JavaScript

// Some of the dependencies (e.g. JSONStream) are hybrid executable-library
// and have a #! /usr/bin/env node at the beginning of the file.
// This webpack loader removes it so that we have valid javascript for webpack to load.
module.exports = function (source) {
return source.toString().replace(/^#! .*\n/, '')
}