source:
frontend/node_modules/rollup-plugin-terser/transform.js
| Last change on this file was 9af201e, checked in by , 11 days ago | |
|---|---|
|
|
| File size: 256 bytes | |
| Line | |
|---|---|
| 1 | const { minify } = require("terser"); |
| 2 | |
| 3 | const transform = (code, optionsString) => { |
| 4 | const options = eval(`(${optionsString})`); |
| 5 | return minify(code, options).then(result => ({ result, nameCache: options.nameCache })); |
| 6 | }; |
| 7 | |
| 8 | exports.transform = transform; |
Note:
See TracBrowser
for help on using the repository browser.
