A
A
Alex Ozerov2020-07-25 20:56:04
webpack
Alex Ozerov, 2020-07-25 20:56:04

What is wrong with webpack config?

It produces the following error:

Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#lo
aders
> <!Doctype html>
| <html lang="en">
| <head>
 @ multi @babel/polyfill ./index.html main[1]

https://github.com/danger-enemy/webpack

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2020-07-25
@ozerovlife

In order for webpack to understand html as a module, you need an html-loader set on files with the .html extension
. The entry specifies exactly the root modules (those that connect all the others from which the program starts)
You need to specify the main js file in the entry, most likely this https: //github.com/danger-enemy/webpack/blob/maste ... HTMLWebpackPlugin will
create html for you .jsx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question