mynameiswhm / brotli-webpack-plugin Goto Github PK
View Code? Open in Web Editor NEWPrepare Brotli-compressed versions of assets to serve them with Content-Encoding: br
License: MIT License
Prepare Brotli-compressed versions of assets to serve them with Content-Encoding: br
License: MIT License
If you use this plugin, the build fails: Segmentation fault: 11
Hi! This is more of a discussion post than a request. With Brotli support becoming fairly widespread (https://caniuse.com/#feat=brotli for those unfamiliar), it seems like it will become the defacto compression plugin over time. Has there been any consideration to merging the codebase with the existing webpack/compression-webpack-plugin ? I know you've already noted that the code is similar. It would be interesting as a way of promoting its usage to have it as a flag on the existing compression plugin (i.e. default to gzip for better support for old browsers, but provide a encodingType: "br"
option, or similar.
Sorry if this is already in motion or been discussed; I couldn't find a similar issue, and brotli is a new discovery for me 😄
Branch | Build failing 🚨 |
---|---|
Dependency |
[webpack](https://github.com/webpack/webpack)
|
Current Version | 4.12.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
splitChunks
import
with sideEffects: false
DependencyReference
[chunkhash]
in target: "webworker"
ProfilingPlugin
lint-staged
The new version differs by 55 commits.
8a7597a
4.12.1
bb38c5d
Merge pull request #7586 from samccone/sjs/fix_webpack_profiling_race
735f99c
Fix race condition in profiling plugin.
3fb49de
Merge pull request #7581 from TimHambourger/master
6dd4d76
Merge pull request #7582 from arkadyt/bugfix/remove-dead-links-from-examples-doc
2bc5437
Merge pull request #7532 from Legends/CommentCompilationWarning
1e7b4e9
Remove dead links from /examples README.md.
2fb9a6c
remove typedef Position import
4fc03e1
Merge pull request #7531 from Legends/APP
1ef1241
Implement all path variables for webworker dynamic imports
afdbf71
removing typedef exports
7969a5a
Importing typedef from Dependency.js ??? Please review.
b03804e
added Compiler, @returns void
4de3ce0
Merge pull request #7554 from greysteil/add-semver-badge
5aafb83
update to lastest version badge
There are 55 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
Branch | Build failing 🚨 |
---|---|
Dependency | iltorb |
Current Version | 2.0.3 |
Type | optionalDependency |
This version is covered by your current version range and after updating it in your project the build failed.
iltorb is a optionalDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
0298a42
bump to v2.0.4
612d820
update install command to use relative paths
0b85c0e
Update brotli to v1.0.3 (#59)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hi,
I used to have an Angular 11 project which was working well with brotli, right after the prod build it created the .br files in the dist folder as it supposed to.
However now that I have upgraded my application to Angular 14 brotli just stopped working and it only generates the pure javascript files which are like 9 times bigger than the old compressed one.
Do you have any guide or tips on how to make brotli compression work with Angular 14?
Tried with 2 different webpack configs, none worked:
var BrotliPlugin = require('brotli-webpack-plugin');
module.exports = {
plugins: [
new BrotliPlugin({
asset: '[path].br[query]',
test: /\.(js|css|html|svg)$/,
threshold: 10240,
minRatio: 0.8
})
]
}
const CompressionPlugin = require("compression-webpack-plugin");
const BrotliPlugin = require("brotli-webpack-plugin");
module.exports = {
plugins: [
new CompressionPlugin({
algorithm: "gzip"
}),
new BrotliPlugin(),
],
};
/usr/src/app/node_modules/brotli-webpack-plugin/index.js:16
throw new Error('iltorb not found');
^
Error: iltorb not found
at new CompressionPlugin (/usr/src/app/node_modules/brotli-webpack-plugin/index.js:16:15)
at getPluginsConfig (/usr/src/app/webpack.config.js:268:5)
at Object.<anonymous> (/usr/src/app/webpack.config.js:335:12)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
error Command failed with exit code 1.
Fails because iltorb is not a specific version [email protected]
4.35.3
to 4.36.0
.This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
append
option now supports the default placeholders in addition to [url]
"..."
when overriding options.The new version differs by 42 commits.
95d21bb
4.36.0
aa1216c
Merge pull request #9422 from webpack/feature/dot-dot-dot-merge
b3ec775
improve merging of resolve and parsing options
53a5ae2
Merge pull request #9419 from vankop/remove-valid-jsdoc-rule
ab75240
Merge pull request #9413 from webpack/dependabot/npm_and_yarn/ajv-6.10.2
0bdabf4
Merge pull request #9418 from webpack/dependabot/npm_and_yarn/eslint-plugin-jsdoc-15.5.2
f207cdc
remove valid jsdoc rule in favour of eslint-plugin-jsdoc
31333a6
chore(deps-dev): bump eslint-plugin-jsdoc from 15.3.9 to 15.5.2
036adf0
Merge pull request #9417 from webpack/dependabot/npm_and_yarn/eslint-plugin-jest-22.8.0
37d4480
Merge pull request #9411 from webpack/dependabot/npm_and_yarn/simple-git-1.121.0
ce2a183
chore(deps-dev): bump eslint-plugin-jest from 22.7.2 to 22.8.0
0beeb7e
Merge pull request #9391 from vankop/create-hash-typescript
bf1a24a
#9391 resolve super call discussion
bd7d95b
#9391 resolve discussions, AbstractMethodError
4190638
chore(deps): bump ajv from 6.10.1 to 6.10.2
There are 42 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Add an option like in compression-webpack-plugin to remove compressed assets.
4.19.0
to 4.19.1
.This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
import()
with target: "electron-main"
uses correct path separator on windowsdevtool: "source-map"
and variants generate SourceMaps when output file is .mjs
browser
field as object is used when using target: "electron-renderer"
export default
are preservedexternals
value, now works correctly as documentedThe new version differs by 15 commits.
b7121c1
4.19.1
ab28497
Merge pull request #8043 from RubenVerborgh/externals-object-array
9bda629
remove bad unit test
f0271d9
fix ExternalModule and test case
3aef0e5
Allow array as value in externals object.
7b91fa6
Merge pull request #8042 from webpack/bugfix/comments-export-default
e08f71c
keep/restore comments in export default
2f78aae
Merge pull request #8038 from sharang-d/patch-5
bb4c2d1
Correctly set the 'browser' value for electron-renderer
5ade574
Merge pull request #7947 from philipwalton/mjs-sourcemap-support
5258471
Merge pull request #8035 from kwonoj/fix-path
2df7b0c
fix(nodemaintemplate): resolve async chunk path platform agnostic
17fafd3
Fix lint errors
a2cc031
Add tests for default source map extensions
12762ff
Add sourcemap support for .mjs output files
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
Branch | Build failing 🚨 |
---|---|
Dependency | webpack |
Current Version | 4.0.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
filename
option to optimization.splitChunks
to modify the filename template for splitted chunksthis.xxx
in ProvidePlugin
The new version differs by 73 commits.
f916fc0
4.1.0
8eba694
Merge pull request #6650 from webpack/bump_watchpack
00f70fc
Merge pull request #6645 from zacanger/fix/6644
2e3d319
Merge pull request #6648 from cheapsteak/patch-1
01c18cc
Merge pull request #6651 from webpack/feature/split-chunks-filename
2e687d0
Merge pull request #6613 from brentwilton/improve-performance-of-module-concatenation-plugin
3c5b104
Merge pull request #6663 from webpack/feature/support-non-js
2c8ea60
expose stuff and all non-bundle modules
b0e14df
Set optimization.splitChunks to false in test webpack config.
ecb65aa
allow to configure filename for splitted chunks
325038d
Update watchpack to 1.5.0
a2fd80e
Update downloads badge to point to graph of downloads
3a41ca4
Fix #6644
39095ef
add todo for ModuleConcatenationPlugin for loop bugfix
f6e366b
Merge pull request #6611 from kvrlk/patch-1
There are 73 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
As usual, Windows users have issues native modules, and windows-build-tools
are heavy and clumsy to use, especially in large dev teams.
Would it be possible to use devongovett/brotli.js instead?
Just an FYI that this plugin gives the following warning in Webpack 4:
(node:16519) DeprecationWarning: Tapable.plugin is deprecated. Use new API on
.hooks
instead
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
It would be nice to include a CHANGELOG.md in the repo, or list the various versions along with their changes in the Release tab, just to understand what a new version includes.
Not sure why I am getting this issue, I am not able to reproduce outside of my project
dyld: lazy symbol binding failed: Symbol not found: __ZN4node19GetCurrentEventLoopEPN2v87IsolateE
Referenced from: /Users/myname/workfolder/apps/node_modules/iltorb/build/bindings/iltorb.node
Expected in: flat namespace
dyld: Symbol not found: __ZN4node19GetCurrentEventLoopEPN2v87IsolateE
Referenced from: /Users/myname/workfolder/apps/node_modules/iltorb/build/bindings/iltorb.node
Expected in: flat namespace
webpack: "^4.20.2",
brotli-webpack-plugin: "^1.1.0",
node: v8.9.4
yarn: 1.15.2
if I downgrade the version of iltorb
dependency, I am not getting this issue but If I use the default version of "iltorb": "^2.0.1"
of brotli-webpack-plugin
then I am getting this issue.
I am using yarn, any thoughts?
Branch | Build failing 🚨 |
---|---|
Dependency |
webpack
|
Current Version | 4.9.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 11 commits.
94cd709
4.9.1
5feb7e6
Merge pull request #7174 from JLHwung/revise-examples-build-readme
4cd0cf5
Merge pull request #7379 from xtuc/refactor-use-wast-in-tests
c513cac
Merge pull request #7403 from webpack/fix/7335
f22fffd
Evaluate arguments in function's scope
55ce143
Add test case
00eafa6
Update mem-access.wat
acc45fd
refactor: switch to wast
7184bb4
fix: keep decoding in wasm
a9d9fee
refactor: switch to tests to wast
64db306
docs(examples): add yarn add webpack-cli step
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
When I upgraded webpack to 3.5.5 and brotli-webpack-plugin to 0.4.0 , build gets stuck with no response, After digging further, i found that plugin bump was causing the issue. Reverting back to 0.3.0 works fine. My guess is that latest changelog is causing this break Moved compilation from this-compilation to emit stage
.
I tried digging further,, but couldn't debug what's going wrong. I'm new to webpack and its plugin model internals.
Possibly related to webpack/webpack#3464 and webpack/webpack-dev-middleware#156
compression-webpack-plugin has a feature, which lets filename prop to be a function which let you customize the file name. Can i make PR for that?
angular 8.0.0
"@angular-builders/custom-webpack": "8.4.1",
"brotli-webpack-plugin": "^1.1.0",
"compression-webpack-plugin": "^6.0.3",
98% after emitting BundleBudgetPluginCannot read property 'size' of undefined
TypeError: Cannot read property 'size' of undefined
at.../node_modules/@angular-devkit/build-angular/src/angular-cli-files/utilities/bundle-calculator.js:48:58
custom-webpack.config.js :
const CompressionPlugin = require(
compression-webpack-plugin); const BrotliPlugin = require(
brotli-webpack-plugin); const path = require(
path); module.exports = { plugins:[ new BrotliPlugin({ asset: '[fileWithoutExt].[ext].br', test: /\.(js|css|html|svg|txt|eot|otf|ttf|gif)$/, deleteOriginalAssets: true , }), new CompressionPlugin({ test: /\.(js|css|html|svg|txt|eot|otf|ttf|gif)$/, filename(info){ let opFile= info.path.split('.'), opFileType = opFile.pop(), opFileName = opFile.join('.'); return
${opFileName}.${opFileType}.gzip; } }) ], }
Hi there,
Currently, npm audit
marks this package as high risk one, because one of this dependency has "Remote Memory Exposure" risk.
High Remote Memory Exposure
Package bl
Dependency of brotli-webpack-plugin [dev]
Path brotli-webpack-plugin > iltorb > prebuild-install > tar-fs >
tar-stream > bl
More info https://npmjs.com/advisories/1555
Hi, the release version that is being used to prebuild is not available in iltorb
repository, could you take a look to update?
Thanks!
info looking for cached prebuild @ /Users/admin/.npm/_prebuilds/d5dc4d-iltorb-v2.4.0-node-v59-darwin-x64.tar.gz
http request GET https://github.com/MayhemYDG/iltorb/releases/download/v2.4.0/iltorb-v2.4.0-node-v59-darwin-x64.tar.gz
http 404 https://github.com/MayhemYDG/iltorb/releases/download/v2.4.0/iltorb-v2.4.0-node-v59-darwin-x64.tar.gz
WARN install No prebuilt binaries found (target=9.4.0 runtime=node arch=x64 platform=darwin)
Local Stack
node (9.4.0)
npm (5.6.0)
webpack (4.16.2)
Node 16 is now LTS, which means this repo no longer needs to be forward and backwards compatible between zlib
and iltorb
. In particular, this also solves another problem my org is facing which is that iltorb
compilation is a cache miss under bazel because it leaves files with SHAs in them. Enforcing LTS versioning and dropping iltorb
from the dep list would solve both of these problems. It would be considered a major, but it's a good move in general.
Hi,
in node version 12 we are getting error:
warning Error running install script for optional dependency: "/home/tratata/ha/node_modules/iltorb: Command failed.
Exit code: 1
Command: detect-libc prebuild-install || node-gyp rebuild
Arguments:
Directory: /home/tratata/ha/node_modules/iltorb
Output:
prebuild-install WARN install No prebuilt binaries found (target=12.16.3 runtime=node arch=x64 platform=linux)
Branch | Build failing 🚨 |
---|---|
Dependency |
webpack
|
Current Version | 4.9.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 13 commits.
317fb35
4.9.2
5c51f0c
Merge pull request #7251 from webpack/types/library_templates
91546a1
fix incorrect default
9c7100b
fix inline object types, add auxiliary comment types
3f183b5
Merge pull request #7210 from gluecodes/master
ae6c7a4
Merge pull request #7279 from cokencode/progress-plugin-bug-fix
4073814
Merge pull request #7219 from webpack/feature/type-all-the-errors
9c0036b
Add a test
9791c0b
fix spacing
737eaa5
Fix a bug where ProgressPlugin is not working properly with MultiCompiler
bbb9f38
fix: ReferenceError: onScriptComplete is not defined when using HMR on Firefox 45
f613e9a
chore(types): add basic type info for a few warning and errors
ed9d024
Add typings for various library template plugins
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency | iltorb |
Current Version | 2.3.2 |
Type | optionalDependency |
This version is covered by your current version range and after updating it in your project the build failed.
iltorb is a optionalDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 15 commits.
adf946d
Bump to v2.4.0
e0d20e3
update dependencies
503179e
Drop Node 9 support
4eda058
Update brotli to v1.0.5, dev deps
3f5cd2f
Replace nan with n-api (#70)
347f05e
Enforce eol lf in fixture txt file
833e02e
Replace mocha/chai with ava
d3a0ec9
Use a bigger text compression fixture
32a1987
Remove the apt config in the travis configuration
80bcec2
Update deps
ea8346e
Don't build branches, only master/PRs
d6cd6fc
Don't mutate user params in compressSync
3a05cbe
Simplify error handling
5553b6a
Remove two unused files
f89840e
Speed up stream tests
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Node 11.7 landed Brotli support:
nodejs/node#24938
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V11.md#notable-changes
It'd probably be nice to publish a new major version of this plugin aimed at this node version and onwards.
The adapter()
-function is very noisy when it comes to outputting what it does. It might make sense to use something other then console.log
in order to notify the user about what's going on. One approach would be to use the debug
-package, which lets the user decide whether he wants to see the warning or keep it suppressed: https://www.npmjs.com/package/debug
function adapter() {
// ...
try {
console.log('warning: couldn\'t find native brotli support in zlib library. trying to fall back to iltorb.');
var iltorb = require('iltorb');
return iltorb.compress;
} catch (err) {
console.log('warning: couldn\'t load iltorb library. trying to fall back to brotli.js.');
// ...
}
}
+ const debug = require('debug');
+ const warn = debug('brotli-webpack-plugin:warning');
+ const err = debug('brotli-webpack-plugin:error');
- console.log('warning: couldn\'t find native brotli support in zlib library. trying to fall back to iltorb.');
+ warn('couldn\'t find native brotli support in zlib library. trying to fall back to iltorb.');
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.