preact-cli-plugin-async icon indicating copy to clipboard operation
preact-cli-plugin-async copied to clipboard

TypeError: Cannot read property 'push' of undefined

Open piotrkochan opened this issue 7 years ago • 4 comments

preact.config.js:

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

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

error:

 npm run build                            
> [email protected] 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

piotrkochan avatar Sep 24 '18 05:09 piotrkochan

Getting the same error.

hguillermo avatar Oct 11 '18 02:10 hguillermo

Same error

ugened47 avatar Dec 27 '18 14:12 ugened47

same...

PhilTheAir avatar Jan 23 '19 11:01 PhilTheAir

solution for this:

include es2017 in your .babelrc file:

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

and perform

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

cht8687 avatar Mar 28 '19 12:03 cht8687