In order for browserify/babel to work with this module and ES6 imports, we need a little helper package that enables readFileSync transformation. This only works with static paths however, so we need to change these, too.
8 lines
278 B
JavaScript
8 lines
278 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
"contribution": JSON.parse(fs.readFileSync(path.join(__dirname, 'schemas', 'contribution.json'))),
|
|
"contributor": JSON.parse(fs.readFileSync(path.join(__dirname, 'schemas', 'contributor.json')))
|
|
};
|