Closed gwynjudd closed 2 years ago
Hi @gwynjudd!
Thanks for reaching out.
I think your webpack.config.js
is incorrectly configured. Make sure you put new RazorPartialViewsWebpackPlugin(...)
to the correct plugins section (a pointer would be to look e.g. HtmlWebpackPlugin
).
I believe this issue to be closely related to yours: https://github.com/webpack/webpack/issues/8548#issuecomment-449829774
TypeError: Cannot read property 'assets' of undefined
when adding new RazorPartialViewsWebpackPlugin(...)
to the wrong section of webpack.config.js
. new RazorPartialViewsWebpackPlugin(...)
to plugins: [ ... ]`, Razor partial views are emitted as expected.I'll close this issue, as the problem most likely is a webpack configuration error rather than a bug in the plugin.
@jouni-kantola thanks yes that seems to have been the problem. Once I moved it to the correct location, all was working as expected
Hello,
I'm pretty new to using webpack and a lot of this stuff here, so please bear with me if I did something dumb.
I used create-react-app (with eject) to make an app, and then according to the guide, I added the plugin
If I run
npm run build
, this output:And if I run
npm run start
, this:Any suggestions for how to proceed?
thanks, Gwyn