Closed kutenai closed 5 years ago
I was frustrated when I wrote that last issue. I've managed to accomplish the immediate task, but I'm still having issues. I had to change the code to:
module.exports = config
From what I understand, the syntax
export default config
Should work fine with @babel/preset-env, so there must be some issue with how Quokka is getting it's configuration information. THAT is the part that frustrates me a great deal, also, the fact that I can't really debug it. If there was a way (maybe there is?) to turn on some debugging data that shows the config files quokka found, and the ones it used, then it might be possible to narrow down the issues I have with it quickly and efficiently.
It would also be very helpful to discuss (and document) how quokka works with the recent version of Babel (7), since there are some changes there. Also, does quokka support things like babel.config.js in local path?
You literally have 4 ways to configure quokka.
The way Quokka configuration is applied is described in our docs, it's a simple rule actually:
The settings in the package.json file override the settings in the global config, settings in the .quokka file override the settings in the package.json file, and the inline settings have the highest precedence and will override any values set with other methods.
WHERE IS THE CONFIGURATION REFERENCE
The above mentioned docs page is the full source of truth for configuring Quokka.
All I want to to AT THIS MOMENT is test a trival script that happens to use ES6 "import" and "export", but quokka will not do it.
Quokka will run your sample without any configuration at all. If you remove all quokka config files, and just leave ~/.quokka/config.json
with
{"pro":true}
your sample just works:
I have quokka configurd in package.json
As specified in our docs (and as you are doing in ~/.quokka/config.json
), Babel plugins are supposed to be specified inside the babel
setting, however in your package.json
, you are specifying them as Quokka plugins instead:
"quokka": {
"babel": true,
"plugins": [ <---
"@babel/plugin-transform-modules-commonjs",
"@babel/plugin-proposal-class-properties",
]
}
hence the issue.
It would also be very helpful to discuss (and document) how quokka works with the recent version of Babel (7), since there are some changes there.
Babel configuration for Quokka, including Babel 7 is fully covered in our docs.
Also, does quokka support things like babel.config.js in local path?
Yes, it does.
and I really do NOT like to pay for tools that I can't use!
We are sorry to hear about your frustration with configuring Quokka. If you find the tool too hard to configure and would not like to use it anymore, we are happy to fully refund your license. Please send us an email to hello@wallabyjs.com and we will arrange license deactivation/refund for you.
I followed your suggestions. It works great now. I apologize for getting so frustrated. I hope that I'm getting to the point where I can get quokka working on a new project with zero or minimal configuration and I can just use it.
When it works, it is fantastic.
Issue description or question
Each and every time I try and use Quokka I have issues. Each. And. Every. Time. The configuration system is a mess!!!! And, it gives NO options to debug it that I am aware of.
You literally have 4 ways to configure quokka. That is multiplied by EVEN MORE if you factor in all of the POSSIBLE ways to configure it.
package.json -- local and global .quoka.js -- .babelrc babel.config.js ~/.quokka/config.js
It's SUCH A PAIN that quokka won't even tell you WHICH FILES it is using. WHERE IS THE DEBUG OPTION ??? *** WHERE IS THE CONFIGURATION REFERENCE?
I don't like poking around trying options all over the place, but I don't know what methodical solution to use.
All I want to to AT THIS MOMENT is test a trival script that happens to use ES6 "import" and "export", but quokka will not do it. I've read your documents many many times, there is no information there that is useful. No matter WHAT ID DO, quokka refuses to work
Sample code
I have a babel.config.js file in the project
I have quokka configurd in package.json
I get useless output like this
There is no quokka.js file ANYWHERE that I know of
I have a config.json file in ~/.quokka
I have a package.json file there also
Since I have NO DEBUGGING CAPABILITIES -- all I can do is shotgun this, just add shit here and there until, if I'm lucky, it MIGHT work
I really wish I could find ONE DEFINITIVE configuration that JUST WORKS for all projects. I thought I could configure quokka at the global level and it will JUST WORK on other projects, but that seems FALSE. And, your documentation is horrible, it just goes and talked about adding information to this file and that file and add a
babel: true
here, or add ababel: true
there, but it does not give you any REAL help. It's more confusing than helpful.I've now spend 30 minutes writing this issue, 1.5 hours trying to ake it work, so that's 2 hours I probably could have been coding something. Quokka is a great tool WHEN IT WORKS but for me, it works about 5% of the time.
Sorry for the rant --- but I'm so frustrated, and I'm not making progress, and I really do NOT like to pay for tools that I can't use!
Sample repository link
If the issue can not be reproduced just using the quokka file above (for example because it requires/imports some files from your project), please create a small repository where the issue can be reproduced.
Quokka.js Console Output
Code editor version
Visual Studio Code v1.? Webstorm v? Atom v1.?
OS name and version
Windows OSX Linux