webpackbin icon indicating copy to clipboard operation
webpackbin copied to clipboard

Expose webpack.config.js

Open ekulabuhov opened this issue 7 years ago • 3 comments

I love current configuration interface but for some cases I would like to experiment with the loaders and their settings. Do you think access to the config file could be added through the UI? Happy to work on that.

ekulabuhov avatar Mar 08 '17 11:03 ekulabuhov

@ekulabuhov Actually all the different config has own implementation. It might seem that this is a UI only thing, but it is actually related to how Webpack is able to combine your code with loaders on the server. So pretty much every loader needs to be verified, as some of them needs to be loaded into memory and need special options. Like Babel loader even has a hack on it to make it understand the cross filesystem vs in memory file system correctly. Even before looking into that they would also have to be part of Webpackbin package.json dependencies. So there is quite a bit of pre configuring to enable these loaders :)

But please, if you want to experiment and see how far you can take it, please do :)

christianalfoni avatar Mar 10 '17 14:03 christianalfoni

Thanks! I've opened this before chatting to you on Discord.

I wonder why do you need to load the loaders into memory? Is that connected to Heroku not having persistent FS?

So at the moment whenever a new version of the loader is released you have to update it manually?

Also, on package.json, that NPM manager that you have built in into UI: is it able to load devDependencies or only project dependencies?

ekulabuhov avatar Mar 10 '17 16:03 ekulabuhov

  1. It has to be loaded into memory because the files of your bin runs in memory :) Did we talk about some loaders passing content of file and others path? Anyways, not exactly sure why it works like this, but I get errors when not loading some of them into memory

  2. Yes, I have to install and verify manually. Also meet problems with for example latest TS-loader, due to TS 2.2 or something... though that seems general. It has some new config file that is difficult to point correctly to due to this FS/In memory thing

  3. Currently this just shoves them into dependencies, though does not really matter to the service. This is rather related to when you download the bin :)

I have been experimenting with this for quite some time and I start to realise that the service gives an impression of being exactly like a local environment with a config file :) Though there are many hacks and hoops to make it work. But the service does work :D I hope when it hits enough users that it might get some attention by the webpack team, maybe we can find better ways to handle it

christianalfoni avatar Mar 10 '17 21:03 christianalfoni