developit / preact-cli-plugin-async

Preact CLI plugin that adds converts async/await to Promises.
https://npm.im/preact-cli-plugin-async
44 stars 10 forks source link

TypeError: Cannot read property 'push' of undefined #20

Open piotrkochan opened 6 years ago

piotrkochan commented 6 years ago

preact.config.js:

import asyncPlugin from 'preact-cli-plugin-async';

export default (config, env, helpers) => {
  asyncPlugin(config);
};

error:

 npm run build                            
> test-widget@0.1.0 build /media/sdb1/dev/preact/test-widget
> preact build --no-prerender --clean --template src/index.ejs --service-worker false

Error: Error at /media/sdb1/dev/preact/test-widget/preact.config.js: 
TypeError: Cannot read property 'push' of undefined
hguillermo commented 6 years ago

Getting the same error.

ugened47 commented 5 years ago

Same error

PhilTheAir commented 5 years ago

same...

cht8687 commented 5 years ago

solution for this:

include es2017 in your .babelrc file:

{
  "presets": ["preact-cli/babel", "es2017"],
}

and perform

npm install --save-dev babel-preset-es2017