是否有可能配置汇总以导入省略.svelte
扩展的svelte组件?
import MyComp from "path/MyComp"
MyComp文件具有.svelte
扩展名
您可以使用以下命令将解析器添加到您的配置中@rollup/plugin-node-resolve
:
rollup.config.js
const resolve = require('@rollup/plugin-node-resolve'); // add this to the other requires
return {
... // the usual things like input, output, ...
plugins: [
resolve({
extensions: ['.svelte', '.js']
}),
svelte(),
... // any other plugin you are running
]
};
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句