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

Discussions in other repos #1

Open
hzoo opened this issue Mar 10, 2018 · 3 comments
Open

Discussions in other repos #1

hzoo opened this issue Mar 10, 2018 · 3 comments

Comments

@hzoo
Copy link

hzoo commented Mar 10, 2018

Just going to leave some links, I haven't tracked this but it's pretty important.

These are regarding .babelrc/node_modules but the issues are going to be around compiling ES6+

@renchap
Copy link
Owner

renchap commented Mar 10, 2018

Thanks!
Here is another one, from the PoV of a package: googleanalytics/autotrack#137

@benjamn
Copy link

benjamn commented Mar 26, 2018

Here's how Meteor 1.6.2 plans to solve this problem: meteor/meteor#9771

Although Meteor does not recompile packages installed in node_modules by default, compilation of specific npm packages (for example, to support older browsers that the package author neglected) can now be enabled in one of two ways:

  • Clone the package repository anywhere in your application outside of node_modules, make any modifications necessary, and then use npm install to link the-package into node_modules:

    npm install imports/the-package

    Meteor will compile the contents of the package exposed via imports/the-package, and this compiled code will be used when you import the-package in any of the usual ways:

    import stuff from "the-package"
    require("the-package") === require("/imports/the-package")
    import("the-package").then(...)

    This reuse of compiled code is the critical new feature that was added in Meteor 1.6.2.

  • Install the package normally with npm install the-package, then create a symbolic link to the installed package elsewhere in your application, outside of node_modules:

    npm install the-package
    cd imports
    ln -s ../node_modules/the-package .

    Again, Meteor will compile the contents of the package because they are exposed outside of node_modules, and the compiled code will be used whenever the-package is imported from node_modules.

    Note: this technique also works if you create symbolic links to individual files, rather than linking the entire package directory.

In both cases, Meteor will compile the exposed code as if it was part of your application, using whatever compiler plugins you have installed. You can influence this compilation using .babelrc files or any other techniques you would normally use to configure compilation of application code.

PR #9771
Feature #6

@balupton
Copy link

balupton commented Apr 9, 2019

Been using https://editions.bevry.me for years now, and automated through https://discuss.bevry.me/t/how-bevry-automates-maintenance-of-its-prolific-open-source-portfolio/693?u=balupton

It seems it already solves what is being asked for in this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants