From 4ddecbf42b88b6d7e2ec993f57a310591c801161 Mon Sep 17 00:00:00 2001 From: yungblud Date: Thu, 13 Apr 2023 16:20:08 +0900 Subject: [PATCH] feat: :zap: modified setup --- examples/LaftelVideo/babel.config.js | 2 +- examples/LaftelVideo/metro.config.js | 2 +- examples/LaftelVideo/tsconfig.json | 4 +++- package.json | 4 ++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/LaftelVideo/babel.config.js b/examples/LaftelVideo/babel.config.js index dc0cf174..51c969cf 100644 --- a/examples/LaftelVideo/babel.config.js +++ b/examples/LaftelVideo/babel.config.js @@ -9,7 +9,7 @@ module.exports = { { extensions: ['.tsx', '.ts', '.js', '.json'], alias: { - [pak.name]: path.join(__dirname, '..', pak.source), + [pak.name]: path.join(__dirname, '../../', pak.source), }, }, ], diff --git a/examples/LaftelVideo/metro.config.js b/examples/LaftelVideo/metro.config.js index fbe280a8..46475fb3 100644 --- a/examples/LaftelVideo/metro.config.js +++ b/examples/LaftelVideo/metro.config.js @@ -3,7 +3,7 @@ const escape = require('escape-string-regexp'); const exclusionList = require('metro-config/src/defaults/exclusionList'); const pak = require('../../package.json'); -const root = path.resolve(__dirname, '..'); +const root = path.resolve(__dirname, '../../'); const modules = Object.keys({ ...pak.peerDependencies, diff --git a/examples/LaftelVideo/tsconfig.json b/examples/LaftelVideo/tsconfig.json index 0cc9cdd6..6c939fc7 100644 --- a/examples/LaftelVideo/tsconfig.json +++ b/examples/LaftelVideo/tsconfig.json @@ -3,7 +3,9 @@ "extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - + "paths": { + "react-native-video": ["../../Video.js"] + }, /* Completeness */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ } diff --git a/package.json b/package.json index f5e455e8..64642a01 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,10 @@ "keymirror": "^0.1.1", "prop-types": "^15.7.2" }, + "peerDependencies": { + "react": "*", + "react-native": "*" + }, "scripts": { "lint": "yarn eslint .", "xbasic": "yarn --cwd examples/basic",