# Error: Plugin/Preset files are not allowed to export objects, only functions

**URL:** <https://discourse.sst.dev/t/error-plugin-preset-files-are-not-allowed-to-export-objects-only-functions/458>\
**Category:** Site Feedback\
**Created:** [September 14, 2018, 7:42am UTC](https://discourse.sst.dev/t/error-plugin-preset-files-are-not-allowed-to-export-objects-only-functions/458 "2018-09-14T07:42:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![server](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@server](https://discourse.sst.dev/u/server)\
**Post date:** [September 14, 2018, 7:42am UTC](https://discourse.sst.dev/t/error-plugin-preset-files-are-not-allowed-to-export-objects-only-functions/458/1 "2018-09-14T07:42:45Z")

</div>

For [https://github.com/AnomalyInnovations/serverless-stack-demo-api](https://github.com/AnomalyInnovations/serverless-stack-demo-api)  
after upgrading “babel-loader” from “^7.1.5”, to “^8.0.2”, when run ‘serverless deploy -v’ got error:

ERROR in **./create.js**  
Module build failed (from ./node\_modules/babel-loader/lib/index.js):  
Error: Plugin/Preset files are not allowed to export objects, only functions. In ./node\_modules/babel-preset-stage-3/lib/index.js

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [September 19, 2018, 6:34pm UTC](https://discourse.sst.dev/t/error-plugin-preset-files-are-not-allowed-to-export-objects-only-functions/458/2 "2018-09-19T18:34:33Z")

</div>

Hmm it might be that there is something new with Babel 8. We internally use [serverless-webpack](https://github.com/serverless-heaven/serverless-webpack) and I don’t think they’ve added support for it yet.
