jcoreio / crater

Meteor/Webpack/React SSR app skeleton that runs your app code outside of Meteor Isobuild
ISC License
82 stars 10 forks source link

branches Master / WebPack2 working? #113

Closed Falieson closed 7 years ago

Falieson commented 7 years ago

First, thanks a bunch for making this repo! Its everything I've been looking for (including Flow!).

I've tried on 2 different macbooks, so I don't think its anything local. I've cloned, and first tried the webpack2 branch and then once I got an error I switched back to master. This is the error I get when running npm start on master.

ERROR in ./~/meteor-imports-webpack-plugin/meteor-config.json
Module parse failed: ~/crater/node_modules/json-string-loader/index.js?json={"meteorProgramsFolder":~/crater/build/meteor/bundle/programs","injectMeteorRuntimeConfig":false,"exclude":["autoupdate","global-imports","hot-code-push","reload","ecmascript"]}!~/crater/node_modules/meteor-imports-webpack-plugin/meteor-config.json Unexpected token (1:114)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (1:114)
jedwards1211 commented 7 years ago

@Falieson I think you may have forgotten to do npm install again after switching back to master? I do need to update the webpack2 branch and merge it into master now that Webpack 2 is officially released.

jedwards1211 commented 7 years ago

@Falieson nevermind, I can reproduce on master too. Let me figure out what's changed...

jedwards1211 commented 7 years ago

@Falieson okay, json-string-loader broke this for some reason. Workaround for right now is to install json-string-loader@1.0.0. I'll push some fixes soon

Isarstyle commented 7 years ago

Had the same Problem.. found a Fix: in the webpack config file webpack\webpack.config.dev.js change the json load part to :

{ test: /meteor-config\.json$/, include: [path.join(root, 'node_modules', 'meteor-imports-webpack-plugin')], use: [{ loader: 'json-string-loader', options: {json: meteorConfig} }] }

ouya99 commented 7 years ago

@Isarstyle's fix also works in webpack 2.2.1