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

Usage outside of Webpack #30

Open
denis-sokolov opened this issue Nov 24, 2020 · 4 comments
Open

Usage outside of Webpack #30

denis-sokolov opened this issue Nov 24, 2020 · 4 comments

Comments

@denis-sokolov
Copy link

Would you consider an option to expose the use of this tool outside of the Webpack compilation? I am aware “webpack-plugin” is in the title, but webpack-specific code in this project is a very small part, just an API adapter, effectively. There’s still

My particular use case is to use it with an app built with Snowpack, but it could also be beneficial with any other way of building an app. There are existing 3rd-party tools, like license-checker, but there’s a lot to like about this particular one: the options, the generated notices file.

If you are open to the idea, I would consider making a small PR. I would start by adding two public functions validateLicenses(dependencies, options) and generateNotices(dependencies, options) at the top level as an alternative to the LicenseCheckerWebpackPlugin. Possibly a tiny CLI, too.

@unindented
Copy link
Contributor

Actually, webpack is kind of important for generating the notice file. This tool generates the notice file based on the third-party dependencies that you're actually bundling, not based on your package(-lock).json. The stuff that you see in a package(-lock).json file doesn't really match what ends up being bundled and distributed to users. That's why the tool relies on webpack's compilation to generate it.

@denis-sokolov
Copy link
Author

You’re completely right, I have misrepresented the relationship between this tool and the Webpack build process.

Nevertheless, I would still like to reiterate my suggestion/request. I don’t have Webpack, and I need to handle my own list of dependencies, but I would still benefit from using the rest of this tools for license validation and notice file generation.

@Keavon
Copy link

Keavon commented Jan 20, 2022

It looks like the industry is shifting away from Webpack and, in part, to Vite (among others). Especially in the Vue community (which my project uses). I'm sure it's not an easy task to change, but I also lend my vote that it would be fantastic to see this support Vite also, or something perhaps more generic/portable.

@fhg-isi
Copy link

fhg-isi commented Jul 27, 2023

Unfortunately, it does not seem to work with next.js. Also see simiarl issue at

codepunkt/webpack-license-plugin#914

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

No branches or pull requests

4 participants