Typescript version 2.2.2
I wrote this require in my UserRoutzr.ts
const users = require(path.join(process.cwd() + \"/data\"));
Needed to use provide plugin, yet neither require nor dynamic imports worked for me, this construct helped though:
module.exports = { // .. chainWebpack: (config) => { config.plugin('provide').use(require('webpack').ProvidePlugin, [ // .. ]) },