-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I can't seem to get this to work without modifying the plugin's use of outputChunk.fileName. This may be something peculiar with my setup, as I've tried to get this to work with the version of tsdown listed in the repo's package.json and still seem to be hitting this error.
The root of this seems to be this line:
tsdown-plugin-inject-css/src/index.ts
Line 181 in 9728769
| const cssFiles: CSSFiles = chunkCssMap.get(outputChunk.fileName); |
The
outputChunk.fileName doesn't match the cached file name in the chunkCssMap. The outputChunk.preliminaryFileName, however, does. I'm not sure how the current reference to outputChunk.fileName works, but given it does with your setup I presume it must be related to my config, which I've attached below. I've hit the same error with single entry points and multiple entry points.
export default {
entry: ['src/main/index.ts'],
platform: 'browser',
format: ['esm'],
tsconfig: 'tsconfig.library.json',
sourcemap: true,
dts: true,
loader: {
'.jpg': 'asset',
'.png': 'asset',
'.svg': 'asset'
},
plugins: [
lightningCss(),
injectCssPlugin()
]Not sure if this issue is helpful or not. I will clone the plugin (which works amazingly apart from this, thanks a ton) with these changes for now, but I'm happy to pop in a PR if you manage to reproduce.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels