Simply doing this:
var moment = require('moment-timezone');
It causes me this in webpack:
ERROR in ./~/moment-timezone/data/packed/latest.json
Module parse failed: /Users/ben/pro/qbvault/node_modules/moment-timezone/data/packed/latest.json Line 2: Unexpected token :
You may need an appropriate loader to handle this file type.
| {
| "version": "2015d",
| "zones": [
| "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q",
@ ./~/moment-timezone/index.js 2:15-51
My stupid error, forgot to import the json-loader to my new project.
Sorry, It has been a long day... :disappointed:
For completeness in case someone stumbles on this.
Here is how to solve it: http://stackoverflow.com/questions/29548386/how-should-i-use-moment-timezone-with-webpack
My solution:
change timezone/data/packed/latest.json
moment.tz.load(require('./data/packed/latest.json'));
to
moment.tz.load(require('!json!./data/packed/latest.json'));
Most helpful comment
For completeness in case someone stumbles on this.
Here is how to solve it: http://stackoverflow.com/questions/29548386/how-should-i-use-moment-timezone-with-webpack