nx-extensions icon indicating copy to clipboard operation
nx-extensions copied to clipboard

Request for enhanced documentation for svelte

Open maku opened this issue 4 years ago • 4 comments

I would really like to use this extension with a svelte app.

But I do not get it how to handle a "custom" rollup config. I read in the docu that there is "--sveltePreprocessConfig" and "--rollupConfig" option for the build step. But I have not found anything how to use this.

Is there documentation or an example project?

maku avatar Dec 30 '20 18:12 maku

Yes, unfortunately there's not that much documentation yet. There's a issue with a example config, the options have to be a path to a js file which manipulates the config.

DominikPieper avatar Dec 30 '20 19:12 DominikPieper

Here it is https://github.com/nxext/nx-extensions/issues/86

DominikPieper avatar Dec 30 '20 19:12 DominikPieper

That's a example in there for the preprocessor config. Just paste it in a js file and add it to the project and add the option with the path

DominikPieper avatar Dec 30 '20 19:12 DominikPieper

So you create a rollup.config.js in project dir, and specify the path to it in svelte.config.cjs? I am trying to get socket.io-client running with a svelte app generated with svelte generator. When I tried to run the serve target, I got a warning indicating some missing dependencies. After installing these, I am getting a couple of circular dependencies. And some more human readable messages which are beyond my powers of comprehension... Why are bundlers so cryptic? 😭

akshay-nm avatar Oct 08 '21 05:10 akshay-nm