I know that maybe I get some negative votes. but it is not a big problem.I have no other option. I tried too much to send data to my node.js server without using form. I used axios. but my main.js doesn't know axios. i installed it
npm install axios
I imported it
import axios from ('axios')
but I got the error ( unexpected Identifier)
after that I tried require
var axios = require ('axios')
but I got the error ( require is not defined)
I installed browserify
npm install broweserify
after that I bundled it with this code
browserify main.js -o bundle.js
but the same error still remains
require is not defined.
has somebody a solution.
APPRECIATED