Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module "URLTokenizer" #25

Open
linonetwo opened this issue Oct 26, 2017 · 3 comments
Open

Cannot find module "URLTokenizer" #25

linonetwo opened this issue Oct 26, 2017 · 3 comments

Comments

@linonetwo
Copy link

linonetwo commented Oct 26, 2017

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?

@linonetwo
Copy link
Author

linonetwo commented Oct 27, 2017

Any chance to solve this?

I think requiring fs and path eliminate the usage in the browser.

@linonetwo
Copy link
Author

@linonetwo
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant