Uncaught ReferenceError: __VITE_IS_MODERN__ is not defined
Uncaught ReferenceError: __VITE_IS_MODERN__ is not defined
我正在使用 @solana/web3.js
和 @solana/spl-token
,但出现错误
Uncaught ReferenceError: __VITE_IS_MODERN__ is not defined
at modulepreload-polyfill:43:3
我不确定是哪个库导致的。
我的导入包列表在这里:
import { useState, useEffect, useRef } from "react";
import Select from "react-select";
import "vite/modulepreload-polyfill";
import {Transaction } from "@solana/web3.js";
import { Connection, PublicKey, Keypair, Transaction} from "@solana/web3.js";
import {Token, TOKEN_PROGRAM_ID,ASSOCIATED_TOKEN_PROGRAM_ID, } from "@solana/spl-token";
import bs58 from "bs58";
package.json
:
删除行
import "vite/modulepreload-polyfill";
我正在使用 @solana/web3.js
和 @solana/spl-token
,但出现错误
Uncaught ReferenceError: __VITE_IS_MODERN__ is not defined
at modulepreload-polyfill:43:3
我不确定是哪个库导致的。
我的导入包列表在这里:
import { useState, useEffect, useRef } from "react";
import Select from "react-select";
import "vite/modulepreload-polyfill";
import {Transaction } from "@solana/web3.js";
import { Connection, PublicKey, Keypair, Transaction} from "@solana/web3.js";
import {Token, TOKEN_PROGRAM_ID,ASSOCIATED_TOKEN_PROGRAM_ID, } from "@solana/spl-token";
import bs58 from "bs58";
package.json
:
删除行
import "vite/modulepreload-polyfill";