framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
17.97k stars 3.24k forks source link

Pragma cannot be set when runtime is automatic (solution suggested) #4218

Open fab-1 opened 10 months ago

fab-1 commented 10 months ago

There is a bug with the latest framework7 version when integrating with the latest version of nextjs.

I get the following error :

./node_modules/framework7/components/actions/actions-class.js
Error: 
  x pragma cannot be set when runtime is automatic

To Reproduce

Steps to reproduce the behavior:

  1. npx create-next-app@latest
  2. npm install framework7
  3. add import Framework7 from ‘framework7/lite-bundle’; in layout.js

Expected behavior

No error shown

Actual Behavior

The following error is shown:

./node_modules/framework7/components/actions/actions-class.js
Error: 
  x pragma cannot be set when runtime is automatic

Additional context

It can be solved by adding (it would force the runtime to be classic for these files)

/** @jsxRuntime classic */ Before each pragma:

/** @jsx $jsx */

silentlight commented 7 months ago

Any luck with it?

damienmauchamp commented 2 months ago

Nothing new?