Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you develop this plugin locally? #184

Open
NullVoxPopuli opened this issue Jul 1, 2022 · 4 comments
Open

How do you develop this plugin locally? #184

NullVoxPopuli opened this issue Jul 1, 2022 · 4 comments

Comments

@NullVoxPopuli
Copy link

Question

I'm mostly wondering how to start rollup in watch mode.

As is, with a normal build, I get this error:

❯ pnpm build

> rollup-plugin-ts@3.0.2 build <repo>
> pnpm run prebuild && pnpm run rollup


> rollup-plugin-ts@3.0.2 prebuild <repo>
> pnpm run clean


> rollup-plugin-ts@3.0.2 clean <repo>
> rimraf dist


> rollup-plugin-ts@3.0.2 rollup <repo>
> ts-node --esm rollup.config.ts

<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js:92
        throw new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url));
              ^
CustomError: ERR_UNKNOWN_FILE_EXTENSION .json <repo>/package.json
    at defaultGetFormat (<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js:92:15)
    at defer (<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/src/esm.ts:296:7)
    at entrypointFallback (<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/src/esm.ts:304:22)
    at getFormat (<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/src/esm.ts:338:26)
    at <repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/src/esm.ts:245:17
    at addShortCircuitFlag (<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/src/esm.ts:409:21)
    at load (<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/src/esm.ts:239:12)
    at load (<repo>/node_modules/.pnpm/ts-node@10.8.1_vslk2fq76uzvudesky66pvr6g4/node_modules/ts-node/src/child/child-loader.ts:18:36)
    at ESMLoader.load (node:internal/modules/esm/loader:407:26)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:326:22)
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.}

I'm mostly wanting to figure out why setting browserslist: false seems to polyfill object spread and object own keys. My hope is that, when using babel + the typescript preset that I could opt out of all polyfilling, and tell consumers of my library to add whatever plugins they need if they're targeting old browsers.

at the moment, browserslist: ['last 1 firefox versions'] has less polyfilling than browserslist: false -- so I was hoping to get to the bottom of why. 🙃

Thanks!

@wessberg
Copy link
Owner

wessberg commented Jul 1, 2022

As for your primary question, try again with Node v18 👍

@NullVoxPopuli
Copy link
Author

ah! I only had v16 -- thanks!

@NullVoxPopuli
Copy link
Author

As for your primary question

do you happen to know something about this browserslist stuff? 😅

@clemyan
Copy link
Contributor

clemyan commented Feb 28, 2023

at the moment, browserslist: ['last 1 firefox versions'] has less polyfilling than browserslist: false -- so I was hoping to get to the bottom of why. 🙃

Probably duplicate of #189?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants