I have the following configuration in snowpack:
/** @type {import("snowpack").SnowpackUserConfig } */
module.exports = {
mount: {
public:{ url: '/', static: true },
src: { url: '/dist' },
runtime: { url: '/runtime' },
},
plugins: [
'@snowpack/plugin-typescript',
['@snowpack/plugin-babel',
{
'input': ['.ts', '.tsx'],
}
]
],
packageOptions: {
/* ... */
},
devOptions: {
/* ... */
},
buildOptions: {
/* ... */
},
};
And this is in my Declaration file index.d.ts
but Snowpack is not reading it when I start the dev server.
declare global {
namespace JSX {
interface IntrinsicElements {
[elName: string]: any;
}
}
}
The only way to get it working is changing the file name to index.ts
question from:
https://stackoverflow.com/questions/66068214/why-snowpack-is-not-taking-my-type-declaration-files 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…