{"action":"opened","issue":{"url":"https://api.github.com/repos/eanplatter/enclave/issues/68","repository_url":"https://api.github.com/repos/eanplatter/enclave","labels_url":"https://api.github.com/repos/eanplatter/enclave/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/eanplatter/enclave/issues/68/comments","events_url":"https://api.github.com/repos/eanplatter/enclave/issues/68/events","html_url":"https://github.com/eanplatter/enclave/issues/68","id":140564160,"number":68,"title":"Make Babel presets / plugins and Webpack loaders configurable.","user":{"login":"eanplatter","id":3782604,"avatar_url":"https://avatars.githubusercontent.com/u/3782604?v=3","gravatar_id":"","url":"https://api.github.com/users/eanplatter","html_url":"https://github.com/eanplatter","followers_url":"https://api.github.com/users/eanplatter/followers","following_url":"https://api.github.com/users/eanplatter/following{/other_user}","gists_url":"https://api.github.com/users/eanplatter/gists{/gist_id}","starred_url":"https://api.github.com/users/eanplatter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eanplatter/subscriptions","organizations_url":"https://api.github.com/users/eanplatter/orgs","repos_url":"https://api.github.com/users/eanplatter/repos","events_url":"https://api.github.com/users/eanplatter/events{/privacy}","received_events_url":"https://api.github.com/users/eanplatter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-14T03:22:44Z","updated_at":"2016-03-14T03:22:44Z","closed_at":null,"body":"Right now Enclave is essentially highjacking the users control of webpack and babel in exchange for simplicity. That's the point.\r\n\r\nBut we don't necessarily want to eliminate all configuration.\r\n\r\nI'd like to extend the basic configuration of webpack loaders and babel presets / plugins into the generation of the `enclave.js` file via the postinstall script.\r\n\r\nThis won't add any additional prompts to the user on install, but will export arrays of loaders, presets, and plugins. It will default to the loaders and plugins we're currently using, and any the user adds will be installed and added into the appropriate files.\r\n\r\nLooks something like this:\r\n``` js\r\n/* enclave.js */\r\n// ...\r\nexports.loaders = ['json', 'url']\r\nexports.presets = ['es2015', 'react']\r\n// ...\r\n```\r\n\r\nIf the user adds loaders or presets they will be integrated into enclave after they re run the npm start script.\r\n\r\nHighjacking APIs is kind of a sensitive subject, because it makes it impossible for the user to reference the API docs of babel and webpack for help, which means enclave bears the brunt of it. But I think for now that's okay."}}