I’d like to raise your attention to two key differences in the way isobuild works between v1.2.1 to v126.96.36.199:
- Meteor watches packages files that are not referenced by package.js .
- Meteor build plugins build files not referenced by package.js .
These two differences caused me some issues when upgrading to v188.8.131.52 (before upgrading to v1.4).
In the repository, you can find two Meteor projects, one of v1.2.1 and another of v184.108.40.206 (also v220.127.116.11, where the results are similar to v18.104.22.168).
In each of these projects I’ve installed a package ‘example:aaa-compiler’ with build plugin that uses the legacy build plugins api (which my legacy code and 3rd party packages that I am using still use) to build files that ends with .aaa , the build process adds to the bundle the js code: “console.log(‘I should be printed only once!’)”.
example:aaa-compiler’s package.js has only the build plugin, and reference only to the build plugin file.
In the package folder there’s a /docs/example-aaa folder with example aaa file.
That example file is symlinked to the app root in both projects.
V1.2.1 - Web
V1.2.1 - Server
V22.214.171.124 - Web
V126.96.36.199 - Server
As a workaround, for now, I added .# prefix to the folder that shouldn’t be watched. This is a very hacky/not-documented workaround, which make the folders hidden for regular operations which might interfere with the project maintenance.
- Why packages files that are out of package.js scope are watched? Issues with that:
1.1 If I have big documentation folder (think something > 5mb with lots of files) why should it be watched?
1.2 Maybe this is a cause for increase in build time in > v1.2?
1.3 I used to have common code residing in packages which I symlinked to the main app, now I can’t do that without getting warnings from the builder (since it now watch duplicates).
- Is there a reason why these out-of-scope files are built? Test folders and documentation folders under a package folder can’t assume they are isolated and out of scope any longer?
- Is this a bug or intended behaviour? I couldn’t find any serious discussion about this issue, or any place where it’s documented.