Correct!
Iâve been using another slight variation of this, to use Meteor as a build tool only (ie. instead of webpack). After creating a new app, change the .meteor/packages
list to:
ecmascript
meteor
standard-minifier-css
standard-minifier-js
Then to work around Meteorâs required exported single main()
function (that webapp
provides), you can use a small local build-tool
package with just one file:
export const main = () => {
console.log('Build complete.');
return 'DAEMON';
};
Now after firing the Meteor Tool up, it just builds (babels, bundles, minifies, runs any build plugins, etc.) and dumps everything in the apps .meteor/local/build
directory. I then have a single build /server/main.js
control file, that moves the built JS files to where I need them.
As an example, Iâm using this approach to develop a frontend React based framework, that integrates with Wordpress. So all of the React development is done as you would expect with the Meteor Tool, and the resulting files are injected into the desired Wordpress instances.
It works amazingly well, and is just another testament to Meteorâs flexibility!