Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drwpow/terser-test
https://github.com/drwpow/terser-test
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/drwpow/terser-test
- Owner: drwpow
- Created: 2019-11-15T00:25:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-15T01:03:56.000Z (about 5 years ago)
- Last Synced: 2024-10-15T00:39:00.026Z (2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Terser test
Simple recreation of bug in `rollup-plugin-terser`.
```
npm i
npm run build
```### Original file (`loader.mjs`)
```
import { a as patchEsm, b as bootstrapLazy } from './core-6bb3a07e.js';const defineCustomElements = (win, options) => {
return patchEsm().then(() => {
bootstrapLazy([["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
});
};export { defineCustomElements };
```### terser CLI (`loader.terser.mjs`)
```
import{a as patchEsm,b as bootstrapLazy}from"./core-6bb3a07e.js";const defineCustomElements=(t,e)=>{return patchEsm().then(()=>{bootstrapLazy([["my-component",[[1,"my-component",{first:[1],middle:[1],last:[1]}]]]],e)})};export{defineCustomElements};
```### rollup (`loader.rollup.mjs`)
```
const a = new Promise();const defineCustomElements = (win, options) => {
return a().then(() => {
});
};export { defineCustomElements };
```### rollup-plugin-terser (`loader.rollup-plugin-terser.mjs`)
```
import{a as o,b as a}from"./core-6bb3a07e.js";const e=(e,r)=>o().then(()=>{a([],r)});export{e as defineCustomElements};
```