Running next.js application after importing @tricking-api/tricks-core-data loads the following error:
./node_modules/@trickingapi/tricks-core-data/tricks/index.ts
Module parse failed: Unexpected token (1:81)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> import { Trick } from '@trickingapi/tricking-ts';export const tr360CartwheelTwist: Trick = require('./data/360CartwheelTwist.json');
This is resolved manually by adding the following line to my next.config.ts file:
transpilePackages: ['@trickingapi/tricks-core-data']
Ideally should not need to do fixes like this in individual projects and should just be able to run
yarn add @tricking-api/tricks-core-data
Running next.js application after importing @tricking-api/tricks-core-data loads the following error:
This is resolved manually by adding the following line to my
next.config.tsfile:Ideally should not need to do fixes like this in individual projects and should just be able to run