Skip to content
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

Enhancement: Page Imports #2986

Closed
ghost opened this issue Oct 30, 2016 · 4 comments
Closed

Enhancement: Page Imports #2986

ghost opened this issue Oct 30, 2016 · 4 comments
Milestone

Comments

@ghost
Copy link

ghost commented Oct 30, 2016

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.

@NickIliev
Copy link
Contributor

NickIliev commented Oct 31, 2016

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

@ghost ghost changed the title Enhancement: codeFile module lookup Enhancement: Page Imports Oct 31, 2016
@ghost
Copy link
Author

ghost commented Oct 31, 2016

@hdeshev
Copy link
Contributor

hdeshev commented Nov 1, 2016

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.

@enchev enchev added this to the 2.4.0 milestone Nov 7, 2016
@enchev enchev self-assigned this Nov 7, 2016
@enchev enchev added the ready for test TSC needs to test this and confirm against live production apps and automated test suites label Nov 7, 2016
@enchev enchev closed this as completed Nov 7, 2016
@vchimev vchimev added done and removed ready for test TSC needs to test this and confirm against live production apps and automated test suites labels Nov 7, 2016
@lock
Copy link

lock bot commented Aug 29, 2019

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.

@lock lock bot unassigned enchev Aug 29, 2019
@lock lock bot locked and limited conversation to collaborators Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants