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
|
* Default options for browser environment
|
||||||
*/
|
*/
|
||||||
const corePath = typeof process !== 'undefined' && process.env.NODE_ENV === 'development'
|
const corePath = typeof process !== 'undefined' && process.env.NODE_ENV === 'development'
|
||||||
? new URL('/node_modules/@ffmpeg/core/dist/ffmpeg-core.js', import.meta.url).href
|
? 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 };
|
export default { corePath };
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef */
|
||||||
const { log } = require('../utils/log');
|
import { log } from '../utils/log';
|
||||||
const {
|
import {
|
||||||
CREATE_FFMPEG_CORE_IS_NOT_DEFINED,
|
CREATE_FFMPEG_CORE_IS_NOT_DEFINED,
|
||||||
} = require('../utils/errors');
|
} from '../utils/errors';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fetch data from remote URL and convert to blob URL
|
* Fetch data from remote URL and convert to blob URL
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const defaultOptions = require('./defaultOptions');
|
import defaultOptions from './defaultOptions';
|
||||||
const { getCreateFFmpegCore } = require('./getCreateFFmpegCore');
|
import { getCreateFFmpegCore } from './getCreateFFmpegCore';
|
||||||
const { fetchFile } = require('./fetchFile');
|
import { fetchFile } from './fetchFile';
|
||||||
|
|
||||||
export { defaultOptions, getCreateFFmpegCore, fetchFile };
|
export { defaultOptions, getCreateFFmpegCore, fetchFile };
|
||||||
|
Loading…
Reference in New Issue
Block a user