DEV Community

Discussion on: Creating a package for Svelte

Collapse
 
johannchopin profile image
johannchopin

Really nice post thanks 👍 Nevertheless, I would encourage to use vanilla js in the export of the Svelte component in index.js:

module.exports = require('./src/Name.svelte');
Enter fullscreen mode Exit fullscreen mode

If this is not done the users of the library will probably have some trouble testing the application with Jest because the node_module files are ignored by default (so es6 is not supported).