preact-cli-plugin-async
preact-cli-plugin-async copied to clipboard
TypeError: Cannot read property 'push' of undefined
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
Getting the same error.
Same error
same...
solution for this:
include es2017 in your .babelrc file:
{
"presets": ["preact-cli/babel", "es2017"],
}
and perform
npm install --save-dev babel-preset-es2017