jedwards1211 / meteor-webpack-react

(DEPRECATED) use jedwards1211/crater instead
https://github.com/jedwards1211/crater
374 stars 75 forks source link

modularize the webpack to meteor process #73

Open jedwards1211 opened 8 years ago

jedwards1211 commented 8 years ago

What I ultimately want is to be able to do the following:

require('shelljs/global');
var webpack2meteor = require('webpack2meteor');
var dirs = require('./dirs');
var serverConfig = require('./webpack/webpack.config.server.dev.js');
var clientConfig = require('./webpack/webpack.config.client.dev.js');

webpack2meteor(serverConfig, {meteor: dirs.meteor, target: 'server', mode: 'development'}, function(err) {
  if (err) return;
  webpack2meteor(clientConfig, {meteor: dirs.meteor, target: 'client', mode: 'development'}, function(err) {
    if (err) return;
    cd(dirs.meteor);
    exec('meteor', {async: true});
  });
});

This would make it possible to handle advanced Webpack use cases, especially code splitting, and allow users to get the latest improvements via the npm package rather than having to continually merge this skeleton project into their code.

jedwards1211 commented 8 years ago

Actually now I'm thinking of using Webpack plugins to handle this, so that users can just put the plugin in their webpack configs and run Webpack however they want.

jedwards1211 commented 8 years ago

Btw, my solution exists in the webpack-meteor-tools branch now. It's not quite ready for prime time but it basically works