-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing modules inside the bundle #1182
Comments
Related to #1160 I will probably get the warning in, if @michaelwjackson is busy on other things. |
I will see if I can let the last bundle file to implicitly bundle everything (what left from other bundles). |
I prefer the approach of report a warning and allow the developer to manage/solve it. In my case now, I found this trying to split the bundles just because I want to replace some modules content during the CI/CD process. If this is solved in the way I suggested I can simplify my build and deploy process, and I think that for any other developer fix it in the |
The current fix in #1160 is going to print a warning but not terminate the task. |
Yes a warning could be ok. |
I'm submitting a bug report
1.3.1
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
10.13.0
NPM Version:
6.4.1
Language:
TypeScript
bundler:
RequireJS
Current behavior:
If none of the globbing in the source section of bundles intercept some transpiled files, those files are not bundled and no warning/error is reported. This cause runtime errors for the missing modules.
For example changing the default
aurelia.json
created by the cli with this:causes:
and no mention about that is reported.
What is needed is that those files are not captured in the
build.bundle()
function, so something like this can be written in the transpile pipeline:At this time all files are captured and so there are no possibilities to intercept them.
Checking at the source code the root cause seems to be located mainly in the
capture(file)
function (at/lib/build/index.js
) that always returnsundefined
(also if the bundler does not subsume it) not allowing more.pipe()
steps after it.Allowing not bundled files to be streamed to other steps (the default template could report them as an error / warning), some manual / custom management can be implemented: suppress, warning, copy the file, or whatelse you need.
A simple case of customization could be to not bundle the
environment.js
(or other configuration related files, but can by anything), copy it in the destination folder as a default, and if needed change it during the CI/CD process.The text was updated successfully, but these errors were encountered: