Closed SachaG closed 4 years ago
TODO:
nova-newsletter
bug. 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:
Fix server-side reloading.
use METEOR_PACKAGE_DIRS
package
folder is a special folder, so i change to use another folder to include all packages meteor_packages
Make SSR work.
in your telescope:webpack2
see: https://github.com/TelescopeJS/Telescope/blob/webpack2/src/server.js
may be you forgot require base-components
, so SSR not work
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"
}
}
}
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?
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
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! :)
What's the status about Webpack and Vulcan?
Great job. Thanks!
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.
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 .
Does this mean deprecating meteor build tool?
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.
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.
Here's a list of things I did to migrate to Webpack, as a reminder to myself.
imply
theecmascript
package, instead add it individually to eachnova:*
package (see https://github.com/thereactivestack/meteor-webpack/issues/44).ReactDOM
toReactRouterSSR
and added local copy of the package to fix themultiple copies of React
issue (see https://github.com/thereactivestack/kickstart-meteor-react-router/issues/83#issuecomment-224975331).meteor-webpack
to enableresolve.alias
(see https://github.com/thereactivestack/meteor-webpack/pull/218).triggerUpdate
toAccountsField
(see https://github.com/studiointeract/accounts-ui/issues/60)datetime.css
fromDateTime.jsx
.Meteor.isClient
instead), for example innova-events
package.import Foo from 'meteor/nova:foo'
withimport Foo from 'nova-foo'
.const
to variables (Foo = "bar"
toconst Foo = "bar"
) everywhere.export.js
andserver.js
files when necessary.