Open yuw27b opened 3 years ago
I can't think of any reason why I shouldn't just use that option inside the plugin code. Can you think of a scenario where browser: true
is not desired when bundling Svelte components?
While we're on this subject though, I'd love it if could have a look at #11 and let me know what you think?
Thanks for looking at my request!
I agree with you. As far as I know, when using svelte components in 11ty generated html, it's always for browsers.
I just wondered if there might be a case of passing another option (e.g. preferBuiltins
, extensions
, etc.) to resolve()
, so I wrote this PR code that way.
However, if you think adding rollupResolveOptions
is too much, just adding {browser: true}
is of course nice for me!
Also, https://github.com/shalomscott/eleventy-plugin-embed-svelte/pull/11 looks a very good idea! Using rollup.config.js
is more clear to users.
Though, I can't give any help how to handle rollupPluginSvelteOptions
at this time... :(
I've added options for @rollup/plugin-node-resolve. This change makes users possible to pass options to @rollup/plugin-node-resolve which is executed by this plugin.
When I add
resolve({browser: true})
torollupInputPlugins
, it will be executed afterresolve()
and the option{browser: true}
has no effect. Therefore, I suppose it would be useful to allow users to pass options to defaultresolve()
.