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

To patch the node_modules in platforms folder using after_prepare hook #31

Merged
merged 1 commit into from
Jan 30, 2018

Conversation

CharlesJu1
Copy link
Contributor

I gave it a try to make the plugin patch the node_modules in the platforms folder rather than the source folder. It seems working ok. Here is what I did:

In package.json, change the before_prepare hook to after_prepare hook and points to a new script file called patch_platform.js
In patch_platform.js, require the platform specific patch-npm-packages.js.
In patch-npm-packages.js, on line 227, require the package.json file from the source dir. The code logic is the same as before.

@EddyVerbruggen EddyVerbruggen merged commit b3e6df5 into EddyVerbruggen:master Jan 30, 2018
EddyVerbruggen added a commit that referenced this pull request Jan 30, 2018
@EddyVerbruggen
Copy link
Owner

Hi @CharlesJu1, I've tested your changes and AFAIK they are rock-solid! The embedded demo app doesn't contain a lot of test-packages, but at least those that I can check work just fine.

Thanks for your efforts! I'm publishing 0.6.0 now.

@EddyVerbruggen EddyVerbruggen added this to the 0.6.0 milestone Jan 30, 2018
@EddyVerbruggen EddyVerbruggen self-assigned this Jan 30, 2018
EddyVerbruggen added a commit that referenced this pull request Jan 30, 2018
@EddyVerbruggen
Copy link
Owner

I wonder if this change affects Webpack-builds by the way. I guess we'll learn soon.

@westlakem
Copy link

As a bonus, this PR seemed to drastically reduce build time (from 10-12 minutes to 2 on our app)

@EddyVerbruggen
Copy link
Owner

@westlakem It sure does, because fi dev-dependencies and platform-specific files of irrelevant platforms are no longer parsed 🚀.

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

Successfully merging this pull request may close these issues.

None yet

3 participants