VulcanJS / Vulcan

šŸŒ‹ A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.89k forks source link

Working on Webpack #1427

Closed SachaG closed 4 years ago

SachaG commented 8 years ago

Here's a list of things I did to migrate to Webpack, as a reminder to myself.

SachaG commented 8 years ago

TODO:

comus commented 7 years ago

hi, @SachaG @xavcz perhaps you are not interested in webpack build now, or focus on Telescope 1.0.0 and graphql. but after i tried, i found some solutions about this issue.

i created a meteor react tutorial todo demo, use meteor-webpack to build, and change the project structure like Telescope. so you will understand it easier. see: https://github.com/comus/todoscope

how to run it

git clone
cd .....
meteor npm install

for development: METEOR_PACKAGE_DIRS=meteor_packages meteor for production: METEOR_PACKAGE_DIRS=meteor_packages meteor --production

the solutions:

finally, i change alias names in webpack.json. so i can use meteor-webpack build the project, or not use it and let meteor handle the build see: https://github.com/comus/todoscope/blob/master/webpack.json

{
  "root": ".",
  "devServer": {
    "host": "localhost"
  },
  "resolve": {
    "alias": {
      "meteor/todo:lib": "meteor_packages/todo-lib/lib/export.js",
      "meteor/todo:core": "meteor_packages/todo-core/lib/export.js",
      "meteor/todo:base-styles": "meteor_packages/todo-base-styles/lib/stylesheets/main.scss",
      "meteor/todo:tasks": "meteor_packages/todo-tasks/lib/export.js",
      "meteor/todo:debug": "meteor_packages/todo-debug/lib/export.js",
      "meteor/todo:users": "meteor_packages/todo-users/lib/export.js",

      "meteor/todo:routing": "packages/todo-routing/lib/export.js",
      "meteor/todo:base-components": "packages/todo-base-components/lib/export.js"
    }
  }
}
xavxyz commented 7 years ago

Waow @comus, great job!!

I believe we'll migrate to Webpack, or offer an easy path to do it, at some point after gathering feedbacks on the GraphQL API.

What do you think @SachaG?

comus commented 7 years ago

there are also someone use webpack and meteor too

Crater A new app skeleton for Meteor/React Meteor/Webpack/React SSR app skeleton that runs your app code outside of Meteor Isobuild https://github.com/jcoreio/crater

SachaG commented 7 years ago

Nice! I'll have to look at this in more detail, but basically my conclusion was that I didn't want to depend on the meteor-webpack package, and that we'd probably wait until we switch out of Meteor completely to migrate to Webpack.

That being said if there's a good way to migrate to Webpack now while remaining on Meteor, why not. Anything we can do to smoothen the transition is good! :)

jpmelnik commented 7 years ago

What's the status about Webpack and Vulcan?

Great job. Thanks!

SachaG commented 7 years ago

No real plans for now, we're waiting to see how Meteor's build tool evolves since a lot of new improvements are announced for 1.5.

iamrommel commented 7 years ago

I'm interested with webpack/gulp and npm combo for modular app development. It has the same concept/architecture as vulcan, but rather than meteor it's webpack/gulp, and rather than atmosphere it's npm. I'm also hesitant to start because im looking for what meteor can offer next

On Apr 22, 2017 10:20 PM, "Sacha Greif" notifications@github.com wrote:

No real plans for now, we're waiting to see how Meteor's build tool evolves since a lot of new improvements are announced for 1.5.

ā€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/VulcanJS/Vulcan/issues/1427#issuecomment-296376369, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK0ceLuauWWQWkosRnD9t8vKYWsVvBJks5rygysgaJpZM4JjltT .

hakimelek commented 6 years ago

Does this mean deprecating meteor build tool?

x5engine commented 6 years ago

You can't get rid of Isobuild from meteor unless you move from Meteor but I think it's not worth it since as Sacha said Meteor have made some really good speed improvements.

eric-burel commented 4 years ago

Closing as we would basically need more work on the Meteor side for this, or moving away from Meteor. Storybook provides an experimental example of using Vulcan with Webpack. It's based on naming conventions to find each package client-side code, and scraps out Meteor specific code that can't be imported correctly.

Next step would be loading some Vulcan package in a Next app for example.