Skip to content

Enhancement: Page Imports #2986

Closed
Closed

Description

It would be great if we could have a new attribute for the <Page> element called import that lets us specify a module name to require/import, instead of it searching for a filename.

This will be very helpful in implementing a clean directory structure.

Also an extension on #1667; codeFile breaks in bundlers like webpack since bundles are by definition single-file. import fixes this by importing with global.loadModule.

@enchev, IIRC you were talking about turning CSS into modules for webpack and this could lend itself to that too by doing the same with a new stylesheet attribute -- with module.exports being a string.

Activity

  1. NickIliev commented on Oct 31, 2016

    @NickIliev
    Contributor

    Hi @vbresults thank you for your feature suggestion!
    Everyone who has an opinion on that matter can write it down in this thread.

    Ping @hshristov , @enchev , @hdeshev

  2. ghost changed the title [-]Enhancement: codeFile module lookup[/-] [+]Enhancement: Page Imports[/+] on Oct 31, 2016
  3. hdeshev commented on Nov 1, 2016

    @hdeshev
    Contributor

    I like the idea. It looks like we can deprecate the codeFile feature as import seems to do the same thing in a more flexible way. For example, you could use it to "import" a platform-specific my-page.android.js file, if needed.

  4. added this to the 2.4.0 milestone on Nov 7, 2016
  5. self-assigned this
    on Nov 7, 2016
  6. added
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Nov 7, 2016
  7. added and removed
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Nov 7, 2016
  8. lock commented on Aug 29, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  9. locked and limited conversation to collaborators on Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions