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

Rollup plugin #2

Open
macintoshhelper opened this issue May 15, 2020 · 0 comments
Open

Rollup plugin #2

macintoshhelper opened this issue May 15, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@macintoshhelper
Copy link
Member

macintoshhelper commented May 15, 2020

Develop a Rollup plugin to resolve platform cascades/extensions.

This could be accompanied by a Webpack plugin, for web entrypoints, but extension resolving for apps could be avoided by using this code pattern:

core.js

let _module;

if (typeof window !== 'undefined) {
  _module = require('./core.web');
} else {
  _module = require('./polyfill'); // JS/React only implementation e.g. render null + console.warns
}

module.exports = _module;
@macintoshhelper macintoshhelper added the enhancement New feature or request label May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant