-
-
Notifications
You must be signed in to change notification settings - Fork 49
0.12 does not correctly include pages and the bundle fails #556
Comments
@PeterStaev I filed a similar issue #555 if (global.TNS_WEBPACK) { this (with changes for your case) works .. but there should be a option to specify this on the webpack.config |
@pbgc nice workaround! I first tried that but also had the register of the plugins in the file, so it crashed and I thought that the functions to register the modules have been removed. After I left only to register xml, ts, sass files it is working like a charm! But I also disabled the automatic registration of pages in my Still think this should allowed as an option in the config file (if possible?) and the docs should indicate that you can still register manually your files in case they don't follow the predefined naming scheme. Otherwise from the blog article you are left with the impression that there is no way to do this. |
@PeterStaev |
Only if you have your pages suffixed with |
Adds a registerModules option for the bundle-config-loader that allows users to specify custom regex to register their modules. Also if needed they can set the new option to false completely disabling automatic module registration for non-angular apps. Closes #556
Issue Checklist
Tell us about the problem
Upgraded a projects that has a complex structure of pages/fragments. All views are located in their own subfolder under
app/views
. There are also "fragments" located in their own subfolder underapp/fragments
. Seems web pack does not include any of those because it has a hardcoded regex check here:nativescript-dev-webpack/register-modules.js
Line 2 in 3e0f381
And from what I see there is no way to override this from the config file. So unless you are naming your pages with a
page
somewhere in them and/or put them in a page folder you are stuck.Also having the rule written like that in case you have done normal build it will double include styles as locally you have both
css
andscss
files.There should be an option to specify your own regex rule. Or at least have ability to register those modules like we did in previous versions
Local environment
Project data
webpack-ios-crash.zip
The text was updated successfully, but these errors were encountered: