Fix vite issue
This commit is contained in:
parent
2bfcada22e
commit
ba2447b9da
@ -1,10 +1,10 @@
|
||||
const { devDependencies } = require('../../package.json');
|
||||
import pkg from '../../package.json';
|
||||
|
||||
/*
|
||||
* Default options for browser environment
|
||||
*/
|
||||
const corePath = typeof process !== 'undefined' && process.env.NODE_ENV === 'development'
|
||||
? new URL('/node_modules/@ffmpeg/core/dist/ffmpeg-core.js', import.meta.url).href
|
||||
: `https://unpkg.com/@ffmpeg/core@${devDependencies['@ffmpeg/core'].substring(1)}/dist/ffmpeg-core.js`;
|
||||
: `https://unpkg.com/@ffmpeg/core@${pkg.devDependencies['@ffmpeg/core'].substring(1)}/dist/ffmpeg-core.js`;
|
||||
|
||||
export default { corePath };
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* eslint-disable no-undef */
|
||||
const { log } = require('../utils/log');
|
||||
const {
|
||||
import { log } from '../utils/log';
|
||||
import {
|
||||
CREATE_FFMPEG_CORE_IS_NOT_DEFINED,
|
||||
} = require('../utils/errors');
|
||||
} from '../utils/errors';
|
||||
|
||||
/*
|
||||
* Fetch data from remote URL and convert to blob URL
|
||||
|
@ -1,5 +1,5 @@
|
||||
const defaultOptions = require('./defaultOptions');
|
||||
const { getCreateFFmpegCore } = require('./getCreateFFmpegCore');
|
||||
const { fetchFile } = require('./fetchFile');
|
||||
import defaultOptions from './defaultOptions';
|
||||
import { getCreateFFmpegCore } from './getCreateFFmpegCore';
|
||||
import { fetchFile } from './fetchFile';
|
||||
|
||||
export { defaultOptions, getCreateFFmpegCore, fetchFile };
|
||||
|
Loading…
Reference in New Issue
Block a user