-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Migrate Webpack base config from native repo to client #114
Comments
Splitting the parts of the Webpack config that handled the native and client repos' separate build processes turned out to be a lot stickier a problem than I had hoped. The biggest hurdle was in maintaining some kind of development environment that would listen to changes as they occurred in both the native and the client repo. Since the client is becoming more like a library for loading plugins, it really can't provide a browser-based development environment until an implementation, eg the native repo, calls it and provides those plugins (although it also underlines the need for proper unit tests). So it makes most sense for the dev server to run from the native repo. It didn't occur to me for the longest time I could just set a watcher on the client's build script, so it would rebuild on any changes in the client repo, and that would trigger the hot module replacement in the native repo's dev server. I still need to document that whole process, and there still a lot of rough edges, but the basic requirements are all in place now:
Still want to work on:
Finally, in the process of sorting all this out I read more about the concept of monorepositories, and feel like we may want to end up there if we start breaking things up into a lot of independent view components and plugins that can easily be swapped in and out. There's a great article on all that, called Monorepos in the Wild, and a tool called Lerna, made by the same folks that make Babel, which could make the whole project a lot easier to manage. Regardless, I think the work here will pay dividends in having separated the build and development processes, by enabling us more freedom to choose down the road. |
(Transferring all issues from old repository. See #92) |
Resolving this issue is contingent on fixing #22 first.
Note that the main
build
script (notbuild-mobile
) will also need to be migrated. The output of this should be targeted to the/dist
folder, andpackage.json.main
should point to that new location so that projects importing the client as a library can find it.This whole process might be made a lot easier and cleaner by re-scaffolding the whole project with vue-cli, to eliminate any unnecessary configurations, and also make it a snap to reestablish the linter (#1) and test suite (#4).
It's worth considering whether Rollup might be a better option at this point, since conventional wisdom seems to favor it for bundling libaries, instead of Webpack.
The text was updated successfully, but these errors were encountered: