Skip to content

preprocess requires files to exist even @if they will not be included #122

@dtsamitros

Description

@dtsamitros

I have the following optional include

// @if PROJ_BUILD='dynamic'
// @include dynamic_script.js
// @endif

even if PROJ_BUILD is not 'dynamic' still the file is still required to exist in the filesystem although it will not be included and an error is raised

node_modules\preprocess\lib\preprocess.js:380
      throw new Error(errMsg);
            ^
Error: dynamic_script.js requested from main.min.js not found!

I know there is the fileNotFoundSilentFail option but it does not feel right to use in this case

Thank you,
Dimitris

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