Open pastinepolenta opened 6 years ago
Ignoring imports by default would be misleading, as it may cause various errors in code that uses them (instead of an existing clear message of what is going on).
However, I like the idea of being able to mock all/some imported modules. As a matter of fact, it is doable now via Quokka plugin in few lines of code. For example, one may intercept the Module._load
function, and if local file is imported, return some mock/stub instead of loading the file.
The plugin would work for both free and pro version, so can be useful for everyone. Would you be interested to create and share a plugin like this?
Thanks for the info, its a good idea. Will it still require the pro version or quokka free detecting the mock will work?
Such plugin will work for both free and Pro versions.
Issue description or question
I am a free user (for now) and I get
Only 'Pro' edition of Quokka.js supports project files import
. The thing is, I would like to use Quokka in parts of the files that don't need the "project files import" I can of course copy those functions in a clean file but that is more time consuming. Can Quokka simply ignore the local imports if they are not supported in free version ?Sample code
Quokka.js Console Output
Code editor version
Visual Studio Code v1.18.1
OS name and version
Windows but irrelevant