-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Plugin improvement: expose truffle-core's index.js in webpack bundle #2222
Comments
issue number with all 2's, nice @cgewecke Is this file actually useful in its current state? I barely even knew it existed. Anyway, just as a quick response:
I haven't looked, but the solution you describe sounds viable, or maybe it's simpler than that... you might only need to define another entrypoint in the webpack config.
I'd be in favor of getting Truffle available as a library!
Probably! I think maybe it's worth collecting use cases here? It wouldn't be awful, but it'd be a shame to suddenly offer Truffle as a library only to have to break the interface quickly afterwards. |
@gnidan Whoa! I didn't notice that about the 2's'. Crazy! I don't know about other use cases but mine is coverage. I need to:
I think if I have
Apologies, could you explain that to me? |
See this part of the webpack config, which defines ... Thinking about this some more... I don't think the risk of breaking change is that big of a deal. Might as well get any kind of useful interface now and worry about a proper interface later. Feel free to open a PR!* (*fyi tho i'm afk for the next week, so i'll have to review/merge when i get back, if no one else beats me to it) Thanks for calling attention to this! |
Sweet thank you and no problem I'm doing all this way in advance. Have a great vacation. Was worried that doing it the analytics.js way might make another huge mostly duplicate bundle. Which is fine with me but will look into the other way anyway....
Probably compile and test will be pretty standard inclusions no matter what. . .I think it's pretty safe. |
Published in |
As a plugin I might like to compile with special settings or run tests after preprocessing something. It would be convenient to have all the resources exported in truffle-core's index.js immediately available with
Not sure but I think this is possible with webpack's expose-loader. Like maybe you just have to expose
truffle-core
asindex.js
and list the bundled cli.js as the package.json's main?Questions
The text was updated successfully, but these errors were encountered: