Closed arthurchenn closed 7 years ago
I found the solution, just change webpack loader config from { test: /.marko$/, loader: 'marko-loader' } to { test: /.marko$/, loader: 'marko-loader', query: { target: 'server' } } , I'm closing the issue.
@arthurchenn Man you are a life saver! Setting query: { target: 'server' }
did the trick! Thanks.
This option should be documented on the readme because without it node compilation gets broken.
I had a working webpack build with marko v3.14.2, mark-loader v1.3.0, everything worked fine, after upgraded to marko v4.1.3(everything else stayed the same), loading marko templates failed. here's my webpack.config.js
source files
server.js
notice bold line there(console.log(hello);), with marko 3.14.2, it output
with marko 4.1.3, it output
{ path: undefined, _: [Function: render], meta: undefined }
everything stayed the same, except marko version(from 3.14.2 to 4.1.3), , what did I do wrong?