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

Include modernizr in webpack output file. #10

Open
GreenGremlin opened this issue Nov 18, 2015 · 4 comments
Open

Include modernizr in webpack output file. #10

GreenGremlin opened this issue Nov 18, 2015 · 4 comments

Comments

@GreenGremlin
Copy link

Is it possible to include the output of ModernizrWebpackPlugin in the main output file rather than creating a separate modernizr.bundle.js file?

@alexpalombaro
Copy link
Owner

@GreenGremlin unfortunately I haven't had any success trying to add the modernizr output as a chunk to the webpack build process.

Having said that @peerigon has a pretty nice solution that should cover your needs 😄 https://www.npmjs.com/package/modernizr-loader

@GreenGremlin
Copy link
Author

Modernizr-loader worked great, thanks!

@ConnerAiken
Copy link

For my current project, the loader is not a practical option.

What I did was create a minified bundle from the Modernizr website and imported it into my entrypoint.

Alternatively, you can use the Modernizr npm package and import it to let webpack bundle it with the output.

@strarsis
Copy link

strarsis commented Nov 16, 2018

Is it possible to @import this customly build modernizr?
@GreenGremlin: I never got modernizr-loader working properly, either webpack wasn't
able to find modernizr or loaded the .modernizr.js instead a custom build modernizr instance.
I mainly need the custom Modernizr build for the CSS classes,
ideally the JavaScript for it is included in the webpacked JavaScript for the site.

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