You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
To get it woking I need to import a bundle-config.js with at least these lines:
if (global.TNS_WEBPACK) {
// This will register each page postfixed xml, css, js, ts, scss etc. in the app/ folder
context = require.context("~/", true, /(page|fragment).(xml|css|js|ts|scss|less|sass)$/);
global.registerWebpackModules(context);
}
because older projects (created by Sidekick!) use:
and it seems that only content with suffix '-page' is processed by the new webpack.config and not the ones with '-fragment' like before using the bundle-config.js
The text was updated successfully, but these errors were encountered:
Bundle config loader
The bundle-config-loader is applied to the entry module and its job is to insert a few predefined configurations. It has the following options:
registerPages <boolean>
Default: true
Registers your app’s XML, CSS and JavaScript pages with a regex. All your pages' resources should be named so that they end with either root or page. For example - main-page.xml, main-page.css, main-page.js.
@NickIliev
OK. I found a workaround (use the bundle-config.js just to register the pages with -fragment suffix) and my project is working .... but I really think that you are wrong! .... when in a Migration guide say to just delete the bundle-config.js file .... and just break projects CREATED WITH SIDEKICK and that were working perfectly with Nativescript 4.1 ....
It would be a LOT nicer to give some direct advice! (IF you are using a project created by sidekick and using the Drawer Template that still uses the shared / fragment aproach .... you must to this and this ... or your project will break if you use webpack bundle ....)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Following the instructions to upgrade an older (pre - 4.0 that was working perfectly on 4.0 and 4.1, with webpack 3) to 0.12 (https://www.nativescript.org/blog/upgrading-to-nativescript-webpack-0.12.0) and deleting bundle-config.js breaks the sidedrawer.
To get it woking I need to import a bundle-config.js with at least these lines:
if (global.TNS_WEBPACK) {
// This will register each
page
postfixed xml, css, js, ts, scss etc. in the app/ foldercontext = require.context("~/", true, /(page|fragment).(xml|css|js|ts|scss|less|sass)$/);
global.registerWebpackModules(context);
}
because older projects (created by Sidekick!) use:
app/shared/drawer-fragment.xml
app/shared/drawer-fragment.android.xml
....
and it seems that only content with suffix '-page' is processed by the new webpack.config and not the ones with '-fragment' like before using the bundle-config.js
The text was updated successfully, but these errors were encountered: