mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 02:42:41 +01:00
Generate bundle.min.js in Node.js install script (#3794)
This commit is contained in:
parent
0b764934e0
commit
297bcea49b
@ -146,6 +146,14 @@ function reset() {
|
||||
snfe.reset();
|
||||
}
|
||||
|
||||
// rollup.js needs module.exports to be set back to the local exports object.
|
||||
// This is because some of the code (e.g. publicsuffixlist.js) sets
|
||||
// module.exports. Once all included files are written like ES modules, using
|
||||
// export statements, this should no longer be necessary.
|
||||
if (typeof module !== 'undefined' && typeof exports !== 'undefined') {
|
||||
module.exports = exports;
|
||||
}
|
||||
|
||||
export {
|
||||
FilteringContext,
|
||||
enableWASM,
|
||||
|
@ -5,7 +5,7 @@
|
||||
"type": "module",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"install": "node install.js",
|
||||
"install": "node install.js && rollup main.js --file bundle.min.cjs --format cjs --context global --plugin terser",
|
||||
"test": "node test.js"
|
||||
},
|
||||
"repository": {
|
||||
@ -22,5 +22,9 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/gorhill/uBlock/issues"
|
||||
},
|
||||
"homepage": "https://github.com/gorhill/uBlock#readme"
|
||||
"homepage": "https://github.com/gorhill/uBlock#readme",
|
||||
"dependencies": {
|
||||
"rollup": "^2.55.1",
|
||||
"rollup-plugin-terser": "^7.0.2"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user