Closed fabiiomiiguel closed 1 week ago
Hi @fabiiomiiguel, thank you for the Issue/PR, indeed I haven't tried to use rollup, Would you mind sharing your working rollup setup vite config? I would be glad to add it to the docs.
Yes of course, this is the build configs that I use with vite.
...
build: {
emptyOutDir: true,
target: 'ES2020',
rollupOptions: {
output: {
entryFileNames: '[name].js',
},
},
cssCodeSplit: false,
},
...
EDIT: @EranGrin I create a simple project from the official Vue 3 template in StackBlitz, so you can see the error also
The PR is Merged, and the docs are updated thanks, closing the issue now
@EranGrin sorry to bother you again.
I saw your new version and sadly the problem persists.
I think it's related with the first /* #__NO_SIDE_EFFECTS__ */
manually added to the build.
I found out the solution in the no-side-effects-notation-spec.md, which is to remove the white spaces.
So if you don't mind could you please do the following steps so I don't need to do a new pull request.
Replace /*! @__NO_SIDE_EFFECTS__ */
by /*#__NO_SIDE_EFFECTS__*/
in the package/src/api-custom-element.ts
file.
Instead of adding /* #__NO_SIDE_EFFECTS__ */
to the build add /*#__NO_SIDE_EFFECTS__*/
in the file.
Second try 😄
@EranGrin when doing the build make sure we don't have spaces in /*! #__NO_SIDE_EFFECTS__ */
.
Because your last commit as it in the package/dist/vue-web-component-wrapper.es.js and also ‎package/dist/vue-web-component-wrapper.umd.js.
I need to check why the build creates add this space, I am quite busy this week so it will take a few days, thanks
When I build my project with vite It throws this warning regarding the __NO_SIDEEFFECTS. I found in a rollup issue the solution.
Also when I build this project it also throws an warning related using named and default exports together. I also found in a rollup issue the solution to disable this warning.
I did a pull request with a suggestion of a fix for both warnings.