question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DLL Plugin broke with 2.x

See original GitHub issue

I’ve got a setup that packages libs into a DLL, to speed up rebuilds. It’s running in full-control-mode, and was working fine in 1.4.x.

Running in 2.2.0, i’m now getting:

Uncaught ReferenceError: vendor is not defined(anonymous function) 
(anonymous function) @ manager.bundle.js:673

I’m guessing it’s caused by Storybook trying to use parts of the same webpack setup? The error is happening before the UI is rendered.

If i remove the DllReferencePlugin, everything works.

webpack.config.js

const webpack = require('webpack');
const merge = require('webpack-merge');
const commonConfig = require('../../tools/webpack/common.config');
const removeCssUrl = require('../utils/remove-css-url');

// Export a function. Accept the base config as the only param.
module.exports = (storybookBaseConfig, configType) => {
  // Merge config files
  const config = merge.smart(storybookBaseConfig, commonConfig);
  config.plugins.push(
    // Use the DLL in development.
    new webpack.DllReferencePlugin({
      context: process.cwd(),
      manifest: require('local-webpack-dlls/vendor.json'),
    })
  );

  // Return the altered config
  return removeCssUrl(config);
};

The script is loaded in the head.html:

head.html

<script data-dll='true' src='/vendor.dll.js'></script>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
thebuildercommented, Aug 5, 2016

Cool! Changing context to __dirname fixed it.

Is it running running the Webpack instance in a new process?

1reaction
arunodacommented, Aug 5, 2016

Could you send me a sample repo where I can test this locally. So, we could fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSE Fixes and DLL Plugin Loader Broken? Please help!
I've been trying to get SSE Fixes to work properly with Mod Organizer 2, but despite following tutorials and the instructions it won't...
Read more >
DLL Plugin Loader - Skyrim Special Edition - Nexus Mods
Simple DLL plugins loader. ... Hope this helps if you were also wondering why after you downgraded to the previous patch that it...
Read more >
SKSE DLL plugins not loading - YouTube
update - skse64 updated again to 2.2.3 **As promised links for the video.▻ Updated RaceMenu for Skryim SE version ...
Read more >
Plugin DLLs that depend on other DLLs - Stack Overflow
I can think of 3 ways. put the dlls in the same folder as your application (you cannot do this?) Use runtime linking....
Read more >
Linux Wine Version 7.20 and Later - ImPDF.dll PDF Save ...
... have broken the use of the ImPDF.dll plugin used for saving PDF files. I was able to get the plugin working again...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found