js文件:導入苗條的html文件到js文件使用匯總
import template from './Template.html';
class VacationListForCompany extends HTMLElement {
constructor() {
super();
const root = this.attachShadow({mode:'open'});
const t = new template({ target: root });
}
}
window.customElements.define("vacation-list-for-company",
VacationListForCompany);
斯維爾特/ HTML文件
<h1> This is from SVELTE </h1>
<script>
export default {
};
</script>
在我Rollupfile 進口從 '彙總 - 插件 - 苗條' 身材苗條;
export default {
input: 'Widgets/VacationListForCompany/widget.js',
output: {
format: 'iife',
file: 'dist/vacationlistforcompany.js',
},
plugins: [
svelte({ include:'*.html'})
],
};
好像彙總是不能夠產生對進口苗條組件.. 我在這裏missunderstanding的東西嗎?
順便說一句,我使用Visual Studio – PEtter