Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to use DllReferencePlugin #678

Closed
serut opened this issue Jan 26, 2017 · 8 comments
Closed

Failed to use DllReferencePlugin #678

serut opened this issue Jan 26, 2017 · 8 comments

Comments

@serut
Copy link

serut commented Jan 26, 2017

Hello,

I would like to use the webpack Dll feature, which divides by 10 the duration of the compilatio of the storybook but with no success.
I tried to setup an heal.html, but the content of that file is inserted into the iframe and not the main body, so it doesn't help.

My webpack.config config file:

  plugins: [
    new webpack.DllReferencePlugin({
      // The path to the manifest file which maps between
      // modules included in a bundle and the internal IDs
      // within that bundle
      manifest: require(`${__dirname}/build/core-manifest.json`),
      context: __dirname
    }),
  ]

The main script inside the html file is :
<script src="static/manager.bundle.js"></script>
And it crashes because the DLL of my app is not included before that script.

Someone succeed to use storybook and Dll ?

@serut
Copy link
Author

serut commented Feb 22, 2017

We are still using Storybook but our 6 months codebase, without any DDL, takes too much time to reload...

webpack built d9f77a1e478e823de48d in 46943ms
webpack building...
webpack built 8d004ec7b173086922ec in 46225ms
webpack building...
webpack built 4d8c5e5507e79e91fc34 in 65157ms
webpack building...
webpack built 3dc4a0e9cb57d9694577 in 55867ms
webpack building...
webpack built d1a2599d544a52db0625 in 59312ms
webpack building...
webpack built cc7a258714361b1c2a11 in 49339ms

A solution would be to be able to edit the index.html with something like that:

<!-- core.bundle.js is our project webpack DLL -->
<script src="/core.bundle.js"></script>
<!-- manager.bundle.js is the storybook webpack compiled javascript file -->
<script src="static/manager.bundle.js"></script>

@ndelangen
Copy link
Member

I hear you!, we will look into improving things for larger codebases.

Sounds like your codebase would be an excellent test-subject, would it be possible for me to get access to it? @serut

@serut
Copy link
Author

serut commented Mar 29, 2017

Our project will be open source on github in few months ! (~4 months)

Moreover I updated webpack from version 1 to 2 and storybook is not working anymore from now.

@ndelangen
Copy link
Member

That's on my radar! But can't make promises on how fast that compatibility comes.

@ndelangen
Copy link
Member

@serut If you'd like to alpha-test the version in the mono-repo? It has webpack 2!

@serut
Copy link
Author

serut commented Apr 12, 2017

Ok I will try to find out the migration tutorial and will come back to you. It just concern webpack 2 and not Dll usage right ?
If you need any other info, please ask !

@jrmyio
Copy link

jrmyio commented Jun 9, 2017

Any updates on this?

@ndelangen
Copy link
Member

The merged PR should allow you to inject any scripts you want! Both in the preview and manager.

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

No branches or pull requests

4 participants