Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the Async/Await Plugin #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dennisvolkmer
Copy link

I moved the .babelrc to the src folder and bumped the version of preact-cli to the latest stable version.
That way the preact async plugin (https://github.com/developit/preact-cli-plugin-async) works out of the box with this template. The issue with the current version is, that the babel config is not yet processed when the prect.conf.js is processed by preact. The async plugin tries to access the babel conf object wich failes when compiling a prod build.
I made a repositiory that uses my fork, wehere you can find a working example that uses some async await code here: https://github.com/dennisvolkmer/preact-cli-widget-async-await-example

Dennis Volkmer added 2 commits August 24, 2018 08:56
For instance Async/Await Plugin (preact-cli-plugin-async) that accesses
the babel conf object while processing the preact.conf.js.

Move the .babelrc to the src folder. Otherwise the babel config is not yet
processed when the preact.conf.js is being processed by preact.
Bump preact-cli version to 2.2.1 to support the plugin out of the box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant