diff --git a/packages/svelte-demo/src/App.svelte b/packages/svelte-demo/src/App.svelte
index 5d7f94c..c6dcc83 100644
--- a/packages/svelte-demo/src/App.svelte
+++ b/packages/svelte-demo/src/App.svelte
@@ -1,5 +1,5 @@
diff --git a/packages/svelte-demo/src/components/ColorStyle.svelte b/packages/svelte-demo/src/components/ColorStyle.svelte
index 26368f9..7b45840 100644
--- a/packages/svelte-demo/src/components/ColorStyle.svelte
+++ b/packages/svelte-demo/src/components/ColorStyle.svelte
@@ -1,5 +1,5 @@
diff --git a/packages/svelte-demo/src/components/Style.svelte b/packages/svelte-demo/src/components/Style.svelte
index e29db2c..be68a5c 100644
--- a/packages/svelte-demo/src/components/Style.svelte
+++ b/packages/svelte-demo/src/components/Style.svelte
@@ -1,5 +1,5 @@
diff --git a/packages/svelte/package.json b/packages/svelte/package.json
index 312ebfe..09150ef 100644
--- a/packages/svelte/package.json
+++ b/packages/svelte/package.json
@@ -11,7 +11,7 @@
"url": "https://github.com/iconify/iconify.git",
"directory": "packages/svelte"
},
- "svelte": "dist/Icon.svelte",
+ "svelte": "dist/component.mjs",
"module": "dist/index.mjs",
"main": "dist/index.js",
"scripts": {
diff --git a/packages/svelte/rollup.config.js b/packages/svelte/rollup.config.js
index 7a29617..af1986d 100644
--- a/packages/svelte/rollup.config.js
+++ b/packages/svelte/rollup.config.js
@@ -15,6 +15,12 @@ try {
);
});
+// Create component.mjs
+fs.writeFileSync(
+ __dirname + '/dist/component.mjs',
+ fs.readFileSync(__dirname + '/src/index.js')
+);
+
// Create bundle
const name = pkg.name
.replace(/^(@\S+\/)?(svelte-)?(\S+)/, '$3')
diff --git a/packages/svelte/src/index.js b/packages/svelte/src/index.js
index 891245c..4f4e69a 100644
--- a/packages/svelte/src/index.js
+++ b/packages/svelte/src/index.js
@@ -1 +1 @@
-export { default } from './Icon.svelte';
+export { default as Icon } from './Icon.svelte';