Kaynağa Gözat

Don't use path.resolve

dev1
Lyubomir Marinov 8 yıl önce
ebeveyn
işleme
1dfd035bf6
1 değiştirilmiş dosya ile 4 ekleme ve 5 silme
  1. 4
    5
      webpack.config.babel.js

+ 4
- 5
webpack.config.babel.js Dosyayı Görüntüle

1
 /* global __dirname */
1
 /* global __dirname */
2
 
2
 
3
 import child_process from 'child_process'; // eslint-disable-line camelcase
3
 import child_process from 'child_process'; // eslint-disable-line camelcase
4
-import path from 'path';
5
 import process from 'process';
4
 import process from 'process';
6
 
5
 
7
 const minimize
6
 const minimize
17
         loaders: [ {
16
         loaders: [ {
18
             // Version this build of the lib-jitsi-meet library.
17
             // Version this build of the lib-jitsi-meet library.
19
 
18
 
20
-            include: path.resolve(__dirname, './JitsiMeetJS.js'),
19
+            include: `${__dirname}/JitsiMeetJS.js`,
21
             loader: 'string-replace',
20
             loader: 'string-replace',
22
             query: {
21
             query: {
23
                 flags: 'g',
22
                 flags: 'g',
24
                 replace:
23
                 replace:
25
                     child_process.execSync( // eslint-disable-line camelcase
24
                     child_process.execSync( // eslint-disable-line camelcase
26
-                            path.resolve(__dirname, './get-version.sh'))
25
+                            `${__dirname}/get-version.sh`)
27
 
26
 
28
                         // The type of the return value of
27
                         // The type of the return value of
29
                         // child_process.execSync is either Buffer or String.
28
                         // child_process.execSync is either Buffer or String.
39
             // Transpile ES2015 (aka ES6) to ES5.
38
             // Transpile ES2015 (aka ES6) to ES5.
40
 
39
 
41
             exclude: [
40
             exclude: [
42
-                path.resolve(__dirname, './modules/RTC/adapter.screenshare.js'),
43
-                path.resolve(__dirname, './node_modules/')
41
+                `${__dirname}/modules/RTC/adapter.screenshare.js`,
42
+                `${__dirname}/node_modules/`
44
             ],
43
             ],
45
             loader: 'babel',
44
             loader: 'babel',
46
             test: /\.js$/
45
             test: /\.js$/

Loading…
İptal
Kaydet