Skip to content

Commit

Permalink
use a global INSPECTOR_VERSION variable instead of process.env.INSPEC…
Browse files Browse the repository at this point in the history
…TOR_VERSION
  • Loading branch information
vincentfretin committed May 21, 2024
1 parent b28c0d7 commit d26adfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/scene/inspector.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global AFRAME */
/* global AFRAME, INSPECTOR_VERSION */
var AFRAME_INJECTED = require('../../constants').AFRAME_INJECTED;
var pkg = require('../../../package');
var registerComponent = require('../../core/component').registerComponent;
Expand All @@ -16,7 +16,7 @@ function getFuzzyPatchVersion (version) {

var INSPECTOR_DEV_URL = 'https://aframe.io/aframe-inspector/dist/aframe-inspector.js';
var INSPECTOR_RELEASE_URL = 'https://unpkg.com/aframe-inspector@' + getFuzzyPatchVersion(pkg.version) + '/dist/aframe-inspector.min.js';
var INSPECTOR_URL = process.env.INSPECTOR_VERSION === 'dev' ? INSPECTOR_DEV_URL : INSPECTOR_RELEASE_URL;
var INSPECTOR_URL = typeof INSPECTOR_VERSION !== 'undefined' && INSPECTOR_VERSION === 'dev' ? INSPECTOR_DEV_URL : INSPECTOR_RELEASE_URL;
var LOADING_MESSAGE = 'Loading Inspector';
var LOADING_ERROR_MESSAGE = 'Error loading Inspector';

Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
'process.env.INSPECTOR_VERSION': JSON.stringify(
INSPECTOR_VERSION: JSON.stringify(
process.env.INSPECTOR_VERSION
)
}),
Expand Down

0 comments on commit d26adfd

Please sign in to comment.