Closed ypahalajani closed 4 years ago
error arose when you run npm run build
you meant the webpack
or watch
command ?
error arose when you run npm run build
you meant the
webpack
orwatch
command ?
Oh yeah! i forgot, you updated the build
to watch
. And, yes, I meant the watch
command
Okay, let me look into it.
As far as this is concerned this should not happen as those are webpack output files.
Webpack should not output files having import
statements in them ! thats what babel-loader
is there for
I don't know why it's happening. Maybe because of the target: node
in the server config.
Still dont know why its coming but merging this as this is a valid fix for this issue
The error arose when you run
npm run watch
which produces a fresh bin/server.js chunk containing mixed import and require syntax and then, runnpm run server:dev
which runs theserver.js
produced from last command.Refer this.
PS: I edited the
build
towatch
in the above statement.