This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
Running app with --path
and --env.snapshot
fails
#584
Labels
--path
and --env.snapshot
fails
#584
Issue Checklist
Tell us about the problem
The following command fails:
with:
Reasons for failure
The
nativescript-dev-webpack
has abefore-watchPatterns
hook. Its job is to tell the {N} CLI what files are watched by the webpack watcher and should be ignored by the CLI watcher. The hook does the following:The problem arises when the webpack config file is required. When the
--env.snapshot
flag is passed, theNativeScriptSnapshotPlugin
is instantiated. That has a side effect - a file, namedsnapshot-entry.js
is created inside the native Android project. This fails when we invoke thetns run
command outside of the project, because the specified path for the created file is relative.Proposed solution
Stop requiring the webpack config file in the hook, because that may have side effects. Instead tell the {N} CLI watcher to ignore the whole source dir.
The text was updated successfully, but these errors were encountered: