Closed rtritto closed 1 month ago
Sorry, I'm confused—how is this a bug?
Build contains mixed quotes ('
and "
).
Source:
// /src/index.ts
import path from 'node:path'
console.log('sep', path.seph)
Dist:
// /dist/index.mjs
- import path from 'node:path' // current
+ import path from "node:path" // expected
console.log("sep", path.seph)
The '
in imports should be replaced with "
at same way of code below imports.
Okay, but why is this a bad thing? Is this breaking your code?
Okay, but why is this a bad thing? Is this breaking your code?
It's bad because it's mixed, so it breaks for example with a search.
As standards and with other bundle libraries, the "
is always used.
It's valid JS.
If you have a preference for specific quote styles in your output, I recommend running it through Prettier or ESLint for formatting.
Alternatively, you can use a quote-style agnostic regex search like this: (["']).+?\1
.
Problem
After run
yarn pkgroll
, the fileis builded with import path having single quoted instead of double quotes.
Expected behavior
Minimal reproduction URL
https://github.com/rtritto/test-pkgroll/tree/bug-quotes
Version
2.5.0
Node.js version
22.9.0
Package manager
yarn
Operating system
Windows
Bugs are expected to be fixed by those affected by it
Compensating engineering work financially will speed up resolution