Cannot find module "URLTokenizer"
linonetwo opened this issue · comments
At
var filename = path.resolve(__dirname, 'module', module + '.js');
if (!fs.existsSync(filename)) {
Where filename === "/module/URLTokenizer.js"
I'm importing it inside electron.
Can we change a way to load module?
Any chance to solve this?
I think requiring fs and path eliminate the usage in the browser.
Consider using https://www.npmjs.com/package/babel-plugin-static-fs
I have an idea: just like what moment do, we can separate main script and plugin. Let user import and passing plugin to the main script.
In this way, we can enjoy the tree shaking, and keep the plugin architecture.