File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
- const { devDependencies } = require ( '../../package.json' ) ;
1
+ import pkg from '../../package.json' ;
2
2
3
3
/*
4
4
* Default options for browser environment
5
5
*/
6
6
const corePath = typeof process !== 'undefined' && process . env . NODE_ENV === 'development'
7
7
? new URL ( '/node_modules/@ffmpeg/core/dist/ffmpeg-core.js' , import . meta. url ) . href
8
- : `https://unpkg.com/@ffmpeg/core@${ devDependencies [ '@ffmpeg/core' ] . substring ( 1 ) } /dist/ffmpeg-core.js` ;
8
+ : `https://unpkg.com/@ffmpeg/core@${ pkg . devDependencies [ '@ffmpeg/core' ] . substring ( 1 ) } /dist/ffmpeg-core.js` ;
9
9
10
10
export default { corePath } ;
Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-undef */
2
- const { log } = require ( '../utils/log' ) ;
3
- const {
2
+ import { log } from '../utils/log' ;
3
+ import {
4
4
CREATE_FFMPEG_CORE_IS_NOT_DEFINED ,
5
- } = require ( '../utils/errors' ) ;
5
+ } from '../utils/errors' ;
6
6
7
7
/*
8
8
* Fetch data from remote URL and convert to blob URL
Original file line number Diff line number Diff line change 1
- const defaultOptions = require ( './defaultOptions' ) ;
2
- const { getCreateFFmpegCore } = require ( './getCreateFFmpegCore' ) ;
3
- const { fetchFile } = require ( './fetchFile' ) ;
1
+ import defaultOptions from './defaultOptions' ;
2
+ import { getCreateFFmpegCore } from './getCreateFFmpegCore' ;
3
+ import { fetchFile } from './fetchFile' ;
4
4
5
5
export { defaultOptions , getCreateFFmpegCore , fetchFile } ;
You can’t perform that action at this time.
0 commit comments