mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 17:49:39 +02: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();
|
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 {
|
export {
|
||||||
FilteringContext,
|
FilteringContext,
|
||||||
enableWASM,
|
enableWASM,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"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"
|
"test": "node test.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -22,5 +22,9 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/gorhill/uBlock/issues"
|
"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