Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: vite v5 warning #5008

Closed
3 tasks done
aeharding opened this issue Oct 31, 2023 · 3 comments · Fixed by #5018
Closed
3 tasks done

bug: vite v5 warning #5008

aeharding opened this issue Oct 31, 2023 · 3 comments · Fixed by #5018
Assignees
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@aeharding
Copy link

aeharding commented Oct 31, 2023

Prerequisites

Stencil Version

4.7.0

Current Behavior

When building an Ionic project with Vite v5 (beta 14), I get the following warning:

vite v5.0.0-beta.14 building for production...
node_modules/.pnpm/@stencil+core@4.7.0/node_modules/@stencil/core/internal/client/index.js (3800:17) A comment

"/*@__PURE__*/"

in "node_modules/.pnpm/@stencil+core@4.7.0/node_modules/@stencil/core/internal/client/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.

Expected Behavior

No warning

System Info

npx stencil info doesn't work - this is an Ionic project with stencil used under the hood I assume

ionic info:

Ionic:

   Ionic CLI       : 7.1.1 (/Users/aeharding/.nvm/versions/node/v20.8.1/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 7.5.2

Capacitor:

   Capacitor CLI      : 5.2.3
   @capacitor/android : 5.2.3
   @capacitor/core    : 5.2.3
   @capacitor/ios     : 5.2.3

Utility:

   cordova-res : not installed globally
   native-run  : not installed globally

System:

   NodeJS : v20.8.1 (/Users/aeharding/.nvm/versions/node/v20.8.1/bin/node)
   npm    : 10.1.0
   OS     : macOS Unknown

Steps to Reproduce

  • Clone repro
  • pnpm i
  • pnpm build
  • Observer warning in console

Code Reproduction URL

/~https://github.com/aeharding/stencil-warning

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Oct 31, 2023
@rwaskiewicz rwaskiewicz added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Nov 1, 2023
@rwaskiewicz
Copy link
Contributor

Thanks!

rwaskiewicz added a commit that referenced this issue Nov 3, 2023
remove `/*@__PURE__*/` comment pragma warnings from vite v5/rollup v4
from a pragma that was applied to a variable assignment that rollup
can't understand.

prior to this fix, building a stencil/ionic project using stencil would
result in a warning in the console similar to the following:
```
vite v5.0.0-beta.14 building for production...
node_modules/.pnpm/@Stencil+core@4.7.0/node_modules/@stencil/core/internal/client/index.js (3800:17) A comment

"/*@__PURE__*/"

in "node_modules/.pnpm/@Stencil+core@4.7.0/node_modules/@stencil/core/internal/client/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
```

Stencil-996 bug: vite v5 warning

fixes: #5008
@rwaskiewicz
Copy link
Contributor

@aeharding Can you give the following dev builds a try when you get a chance?

pnpm i @ionic/react@7.5.4-dev.11699023297.172bb30f  @ionic/react-router@7.5.4-dev.11699023297.172bb30f ionicons@7.2.2-dev.11699022363.15a70775

@rwaskiewicz rwaskiewicz self-assigned this Nov 3, 2023
github-merge-queue bot pushed a commit that referenced this issue Nov 6, 2023
remove `/*@__PURE__*/` comment pragma warnings from vite v5/rollup v4
from a pragma that was applied to a variable assignment that rollup
can't understand.

prior to this fix, building a stencil/ionic project using stencil would
result in a warning in the console similar to the following:
```
vite v5.0.0-beta.14 building for production...
node_modules/.pnpm/@Stencil+core@4.7.0/node_modules/@stencil/core/internal/client/index.js (3800:17) A comment

"/*@__PURE__*/"

in "node_modules/.pnpm/@Stencil+core@4.7.0/node_modules/@stencil/core/internal/client/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
```

Stencil-996 bug: vite v5 warning

fixes: #5008
@tanner-reits
Copy link
Contributor

The fix for this went out as a part of today's v4.7.2 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants