Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Uncaught ReferenceError: vendor_ is not defined when using DllReferencePlugin #1660

Closed
sturatcliffe opened this issue May 28, 2018 · 5 comments

Comments

@sturatcliffe
Copy link

sturatcliffe commented May 28, 2018

Firstly, apologies for raising yet another issue around this, I've already tried everything in this one with no luck.

I've put together a sample application which displays this issue for me, it can be found here. The steps to reproduce are as follows:

Clone the above repo
dotnet restore
npm install
npm run webpack
dotnet run

I receive the following error: NodeInvocationException: vendor_19f7ef894c06af9bbdef is not defined

I've tried everything in the issue linked above, as well as playing around with the DllPlugin settings in both webpack.config.js and webpack.config.vendor.js. The only way to get the app working that I've found so far is to remove the following from webpack.config.js:

new webpack.DllReferencePlugin({
  context: __dirname,
  manifest: require("./wwwroot/dist/vendor-manifest.json")
})

Any ideas what I'm missing? I'm sure it's something very simple but I can't figure it out!

I'm running node v8.9.3 / npm v5.6.0 / dotnet v2.1.3 if it helps.

Cheers

@SteveSandersonMS
Copy link
Member

Since this is a Webpack config question (and you have a custom Webpack configuration), would you be able to raise it with the Webpack community? Thanks!

@sturatcliffe
Copy link
Author

sturatcliffe commented May 29, 2018

Hi @SteveSandersonMS - this was originally generated using the dotnet CLI (VueJS template). All I've done is remove TypeScript for personal preference, and add a couple of extra parts around SCSS and ES6 support. The DllReference code is all standard dotnet template as far as I can recall?

The main thing missing for me in the template is SSR - when rendering purely on the client, the DllReference isn't an issue.

Cheers.

@SteveSandersonMS
Copy link
Member

DllReferencePlugin is a standard Webpack feature, not a .NET Core feature. I don't think we ever had support for SSR in the Vue template.

@sturatcliffe
Copy link
Author

No the VueJS template doesn't have SSR, I'm just trying to add it in but as soon as I render on the server I get this issue. Client rendering is fine. I'll jump on SO and raise it there.

Thanks for your help.

@selaromdotnet
Copy link

hey @sturatcliffe did you ever get this working? I'm facing a similar issue (linked above) perhaps you can offer some insight?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants