-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
ReferenceError when using preact.config.js #343
Comments
@acoll You shouldn't do anything specific as webpack + babel work out of the box. You only add that |
when you do this, you are telling the |
@rodush Yea my intent was to add a new webpack loader that isn't included in the default webpack config (the polymer loader to be specific). @reznord I think this makes sense, maybe the docs should mention that if you use a preact.config.js then you also need to include a babel config. Also if you don't the cli could fail with a more helpful message. If thats the right direction I'd be happy add some error handling and send a pull request. |
You are wrong! You don't need to specify the It would be great if you can link to your code where you are getting this problem (the whole project) so I can test it locally. |
Oh I misunderstood. Also I was unable to get the same error when starting a fresh project which led me to realize that this only happens inside a nested directory of another project with a package.json that has its own babel config. I created a subdirectory inside an existing project and did a fresh It seems like this was just caused by my weird directory structure and can be closed. Thanks for the help. Apologies. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I added a preact.config.js because I wanted to add a webpack loader. I added an empty function that does nothing. Next I ran
preact watch
which results in this error:I traced the bug back to here: https://github.com/developit/preact-cli/blob/master/src/lib/webpack/transform-config.js#L19.
I was able to workaround this by just creating an empty .babelrc in my project like this:
The text was updated successfully, but these errors were encountered: