Resolve dependency module requiring

* es5 style module exports
* remove script tag require
* webpack config ProvidePlugin

Note that this commit only fix JavaScript module loading runtime error.
This commit is contained in:
Yukai Huang 2016-10-08 20:02:30 +08:00
parent 0be342c44d
commit 963a435ae1
9 changed files with 175 additions and 59 deletions

View file

@ -1,3 +1,13 @@
var store = require('store');
var common = require('./common');
var checkIfAuth = common.checkIfAuth;
var urlpath = common.urlpath;
var extra = require('./extra');
var renderFilename = extra.renderFilename;
var md = extra.md;
var migrateHistoryFromTempCallback = null;
migrateHistoryFromTemp();
@ -365,4 +375,8 @@ function parseToHistory(list, notehistory, callback) {
}
}
callback(list, notehistory);
}
}
module.exports = {
writeHistory: writeHistory
}