-
Notifications
You must be signed in to change notification settings - Fork 74
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
SyntaxError: unknown: Unexpected token (import) #102
Comments
It happens to me too. Any advice? |
I'm having the same problem |
I also have this problem. |
I thought webpack looked really awesome but because of this I have to go back to grunt lol |
I have the same problem here when I trying extract a html that depends on a CSS and Js file. Help me, please. |
Disable the ES modules syntax in |
@tlusk Thank you!! Solution
Explanationextract-loader is transforming modules with babel-preset-env (deprecated) which doesn't recognize some of the newer syntax features. I'm guessing #109 will resolve this issue, but for now disabling |
I tried disabling
|
I am not using html-loader still get this issue. |
@prionkor You are using some module that is running the extract-loader. In my case it was the extract-loader after css-loader. Setting the option |
With url(./whatever.woff) in the file, this raises another error |
I'm not sure what the correct forum is to ask for help; if you think this is not the place, please direct me towards a better alternative.
I'm starting to learn webpack, following a tutorial which uses html-loader, extract-loader and file-loader. When I apply the extract-loader to an HTML file that depends on a CSS and JS file, webpack seems to be unable to compile the HTML:
Here's a snippet of the error.
It seems there is a problem with the
import
keyword.Is there a way to solve this issue or am I missing understanding somewhere?
Thank you.
The text was updated successfully, but these errors were encountered: