Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not seem to work with webpack2 #13

Closed
evelant opened this issue Sep 25, 2016 · 6 comments
Closed

Does not seem to work with webpack2 #13

evelant opened this issue Sep 25, 2016 · 6 comments

Comments

@evelant
Copy link

evelant commented Sep 25, 2016

I am trying to use this with https://github.com/jedwards1211/crater on webpack2. On the client var config = require('./meteor-config.json'); in meteor-imports.js is always an empty object instead of the config. It seems like json-string-loader is not inserting the config for some reason.

compiler.options.module.loaders.push({
      meteorImports: true,
      test: /\.json$/,
      loader: 'json-string-loader?json=' + JSON.stringify(self.config)
    });

Unfortunately I am fairly new to webpack and am out of ideas about how to debug this.

@jedwards1211
Copy link
Owner

Probably something has changed in Webpack 2 (which I'm sure will happen during beta stage), I'll look into it eventually. Does it work with webpack-2.1.0-beta.22?

@evelant
Copy link
Author

evelant commented Sep 30, 2016

@jedwards1211 beta22 works. Beta 23+ fails. I have tried all sorts of stuff but in beta23+ it seems webpack simply will not resolve meteor-config with the json-string-loader.

@jedwards1211
Copy link
Owner

@Fignuts I don't guess you have any idea about this?
I still haven't figured out why it's not working...

@jedwards1211
Copy link
Owner

Okay, I figured it all out! Yay!

@jedwards1211
Copy link
Owner

@luisherranz now that I put the webpack 2 code in master, could you delete the webpack2 branch? I created a webpack1 branch from the old master.

@luisherranz
Copy link
Collaborator

luisherranz commented Mar 31, 2017

Deleted 👍

Thanks for your contribution @jedwards1211!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants