Like the title said,I have this demand.But after I tried several ways,I found it cannot be done.Is there anyone experienced the same situation,and solved this problem?
I had the same need for a plugin. I solved it by using the opener plugin. You can see how I use it here.
2 Likes
Thank you for you reply, and it works for my plugin,but What I don't understand is, I need to set the package.json like you,add a 'browser' field:
"browser": {
"child_process": false,
"fs": false
},
So that i can use the opener.
Can you explain what does this config mean?
It just signals to webpack not to try to package the child_process or fs packages. I'm not an expert though, someone else might have a better answer for you.
I get this error TypeError: t.default is not a function
when trying to use that now. any other solution?
You can use the openItem command. An example of its usage is here
2 Likes