Hi, after creating a new Framework7 project (no Vue or React) using the CLI and converting some files to typescript, i’m getting a lot of build errors. The project runs fine using npm start but not using npm run build.
I created a repository with the code that reproduces the issue. Clone the repo, then run “npm install && npm run build”. Does anybody know how to resolve this issue with the build ? I spent a week on this without being able to figure it out. Thanks!
https://github.com/biguphpc/f7-tester
F7 Version: v8.3.0
tester$ npm run build
> [email protected] build
> cross-env NODE_ENV=production vite build && npx workbox generateSW workbox-config.js
vite v4.5.0 building for production...
node_modules/framework7/framework7-types.d.ts (4:21) "Support" is not exported by "node_modules/framework7/shared/get-support.js", imported by "node_modules/framework7/framework7-types.d.ts".
node_modules/framework7/framework7-types.d.ts (5:20) "Device" is not exported by "node_modules/framework7/shared/get-device.js", imported by "node_modules/framework7/framework7-types.d.ts".
... more warnings
node_modules/framework7/framework7-types.d.ts (87:9) "VirtualList" is not exported by "node_modules/framework7/components/virtual-list/virtual-list.js", imported by "node_modules/framework7/framework7-types.d.ts".
✓ 241 modules transformed.
✓ built in 7.34s
"Support" is not exported by "node_modules/framework7/shared/get-support.js", imported by "node_modules/framework7/framework7-types.d.ts".
file: /tmp/tester/node_modules/framework7/framework7-types.d.ts:4:21
2: import Framework7 from './components/app/app-class.js'
3:
4: import { getSupport, Support } from './shared/get-support.js';
^
5: import { getDevice, Device } from './shared/get-device.js';
6: import { Utils } from './shared/utils.js';
error during build:
RollupError: "Support" is not exported by "node_modules/framework7/shared/get-support.js", imported by "node_modules/framework7/framework7-types.d.ts".
at error (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
at Module.error (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:13745:16)
at Module.traceVariable (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:14175:29)
at Module.getVariableForExportName (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:13925:35)
at Module.includeAllExports (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:13974:39)
at Module.includeAllInBundle (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:13999:14)
at Graph.includeStatements (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:25834:24)
at Graph.build (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:25740:14)
at async file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:26706:13
at async catchUnfinishedHookActions (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:25910:16)
at async rollupInternal (file:///tmp/tester/node_modules/rollup/dist/es/shared/node-entry.js:26701:5)
at async build (file:///tmp/tester/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:48079:18)
at async CAC.<anonymous> (file:///tmp/tester/node_modules/vite/dist/node/cli.js:842:9)