Closed NetOpWibby closed 6 years ago
I like const reqlib = require('app-root-path').require; but I would love to use this with import. How would I go about doing this?
const reqlib = require('app-root-path').require;
import
This should work:
import { require as reqlib } from "app-root-path"; reqlib('foo');
Sweet, thanks man! :D
I like
const reqlib = require('app-root-path').require;
but I would love to use this withimport
. How would I go about doing this?