diff --git a/src/phase-streams/dedupe-bundle-css.js b/src/phase-streams/dedupe-bundle-css.js index 57d7913..c4dd469 100644 --- a/src/phase-streams/dedupe-bundle-css.js +++ b/src/phase-streams/dedupe-bundle-css.js @@ -16,8 +16,11 @@ module.exports = function createDedupeBundleCssStream(options) { let allCss = ""; let loaderItem; - // Get the (absolute!) path of the folder containing the initial entry file, as a reference point for relative paths in the output - let entryPoint = path.dirname(path.resolve(options._flags.entries[0])); + let entryPoint = (options._flags.entries != null) + // Get the (absolute!) path of the folder containing the initial entry file, as a reference point for relative paths in the output + ? path.dirname(path.resolve(options._flags.entries[0])) + // ... or, if no entry file is specified, go off the current working directory + : process.cwd() return stream((item) => { // And the same for the loader shim path. All this relative-path stuff is to prevent absolute filesystem URLs from leaking into the output, as those might contain sensitive information.