Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

0.12 does not correctly include pages and the bundle fails #556

Closed
@PeterStaev

Description

@PeterStaev

Issue Checklist

  • You are submitting: bug report
  • You verified that this is a real problem by searching the [NativeScript Forum] and the other [issues] in this repo.
  • You checked our [demo apps] and the [documentation] for sample usage.

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 under app/fragments. Seems web pack does not include any of those because it has a hardcoded regex check here:

const context = require.context("~/", true, /(root|page)\.(xml|css|js|ts|scss)$/);

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 and scss 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

  • Platform Mac
  • Node version 8.9.4
  • NativeScript CLI version 4.1.0

Project data

  • Platform you are building the app for iOS

webpack-ios-crash.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions