I am still pretty new with frontity, but I’m slowly getting to grips with it!
I was wondering how and if I can use most npm packages like ui kits or bootstrap? I have installed in with npm and tried adding the path to frontity.settings.js but to no success
Can I get a point to the right direction or should I stop trying?
You should be able to use most npm packages available in npmjs.com. What have your installed and what did you add to frontity .settings.js? Could you provide a link to a repo so that we can see your code. Thanks.
As an example of using a npm package with Frontity here’s a repo that uses antd.
I do have one other problem, for example with reactstrap I get a Babel error from default export syntax and it tells me to edit babel config file. I don’t want to do this so I have added the package fix as a dev dependency (@babel/plugin-syntax-export-default-from )
My question is now how do I add a dev dependency to the frontity settings file? Or alternatively could you show me how to edit the babel config?
Sorry to keep this thread going but I’m back to having issues with modules!! For example this happens with both stripe and react-helmet. They have been installed in package.Json and also I have updated frontity.settings.Json packages to reflect so.
I have removed the packages abs they work without it. Is this todo with my setup or the package?
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at getKeys (webpack-internal:///./node_modules/deepmerge/dist/cjs.js:2:1009)
at mergeObject (webpack-internal:///./node_modules/deepmerge/dist/cjs.js:6:213)
at deepmerge (webpack-internal:///./node_modules/deepmerge/dist/cjs.js:8:379)
at eval (webpack-internal:///./node_modules/@frontity/core/src/utils/merge-packages.ts:8:484)
at Array.forEach (<anonymous>)
at __webpack_exports__.default (webpack-internal:///./node_modules/@frontity/core/src/utils/merge-packages.ts:8:226)
at __webpack_exports__.default (webpack-internal:///./node_modules/@frontity/core/src/server/store.ts:5:271)
at eval (webpack-internal:///./node_modules/@frontity/core/src/server/index.tsx:61:68)
at eval (webpack-internal:///./node_modules/koa-mount/index.js:16:290)
Not a problem at all @loscar9. react-helmet is already included with Frontity - you shouldn’t need to install it separately. It could be useful if you provide a link to a repo so we can take a look at your code. Hopefully @David from our dev team will be able to shed some light here.
First, you don’t have to add all packages in the frontity.settings.js file, only those that are Frontity packages. A Frontity package is an NPM package with a specific folder structure that can interact with the Frontity framework and other Frontity packages, sharing state, actions and libraries between them. They need to be added in the frontity.settings.js file so the Frontity framework is aware of them. But, other packages don’t need to do so.