Comments (7)
Hey just wanted to give you an update: I am planning on releasing a new major version which will fix the issue
from license-webpack-plugin.
Sounds like a bug in this package. This plugin inserts a hook right before webpack outputs the file. I took a look at the BannerPlugin which comes with webpack, and it appears that plugin inserts a hook at a different phase https://github.com/webpack/webpack/blob/5238159d211576bb313d99d487e415f3799af795/lib/BannerPlugin.js#L50
I'll see if I can change the phase the plugin uses
from license-webpack-plugin.
@xz64 any ETA on this?
from license-webpack-plugin.
I have published an alpha of the next release. You can install license-webpack-plugin@next
to get the alpha release. Please try it out and let me know if you are seeing the same issue there. There are some breaking changes, so please check out the dev branch (MIGRATION.md file) for some documentation on that.
from license-webpack-plugin.
I tried this config with the 2.0.0 alpha 6:
new LicenseWebpackPlugin({
licenseInclusionTest: (licenseType) => {
return true;
},
unacceptableLicenseTest: (licenseType) => {
return /GPL/i.test(licenseType);
},
handleUnacceptableLicense: (packageName, licenseType) => {
throw new Error(`${packageName} has unacceptable license type: ${licenseType}`);
},
handleMissingLicenseText: (packageName, licenseType) => {
console.warn(`Cannot find license for ${packageName}`);
return 'UNKNOWN';
},
perChunkOutput: false,
licenseTemplateDir: 'templates/licenses/',
addBanner: true,
renderBanner: (filename, modules) => {
return '/*! licenses are at ' + filename + '*/';
},
additionalModules: [
packageDirInfo('babel-polyfill'),
packageDirInfo('font-awesome'),
packageDirInfo('gettext-parser'),
packageDirInfo('modernizr'),
packageDirInfo('player.js'),
packageDirInfo('plotly.js'),
],
licenseTypeOverrides: {
'font-awesome': 'MIT',
'xmldom': 'MIT',
},
}),
The banner doesn't get added to the JS bundle, and in my production buidl, the license.txt file doesn't seem to get generated.
from license-webpack-plugin.
This was due to a bug where the addBanner
and perChunkOutput
options were switched (see #48). I have fixed it in v2.0.0-alpha.7. Please try that out and let me know if you have any issues.
from license-webpack-plugin.
Everything seems to be working in v2.0.0-alpha.7, thanks!
from license-webpack-plugin.
Related Issues (20)
- when module.resource startsWith `delegated` and throw error HOT 1
- incompatible with webpack 5.47.0 HOT 3
- missing webpack-sources in dependencies HOT 3
- Add loader to load the generated licenses report HOT 1
- Improve pathExists and isDirectory performance once graceful-fs supports it HOT 1
- Support inclusion of extra licenses HOT 1
- plugin will throw error with virtual file
- Type 'LicenseWebpackPlugin' is not assignable to type 'WebpackPluginInstance'.
- Licenses of ES modules in concatenated modules are not emitted HOT 1
- [Webpack 5] Banner rendered, but license file not created
- Version 4.0.1 doesn't respect the excludedPackageTest option HOT 4
- Version 4.0.1 fails when using dynamic imports HOT 2
- make it possible to define lines in `licenseFileOverrides` HOT 2
- turn off warnings for specific packets HOT 1
- License whitelist HOT 1
- ENOENT: No such file or directory, scandir (only on windows) HOT 5
- Suggestion: adjustment for license filename match
- Packages with similar names cause `Multiple assets emit different content to the same filename` error. HOT 1
- Could not find any license file for vega-lite HOT 1
- Support UNLICENSE file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from license-webpack-plugin.