diff --git a/devtools/shared/loader/Loader.jsm b/devtools/shared/loader/Loader.jsm index e6a596ef2ce2..5b46ae863f64 100644 --- a/devtools/shared/loader/Loader.jsm +++ b/devtools/shared/loader/Loader.jsm @@ -11,8 +11,8 @@ var { Loader, Require, resolveURI, unload } = ChromeUtils.import( "resource://devtools/shared/loader/base-loader.js" ); -var { requireRawId } = ChromeUtils.import( - "resource://devtools/shared/loader/loader-plugin-raw.jsm" +var { requireRawId } = ChromeUtils.importESModule( + "resource://devtools/shared/loader/loader-plugin-raw.sys.mjs" ); const { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" diff --git a/devtools/shared/loader/loader-plugin-raw.jsm b/devtools/shared/loader/loader-plugin-raw.sys.mjs similarity index 92% rename from devtools/shared/loader/loader-plugin-raw.jsm rename to devtools/shared/loader/loader-plugin-raw.sys.mjs index d75a17484b8b..237c2668b7ce 100644 --- a/devtools/shared/loader/loader-plugin-raw.jsm +++ b/devtools/shared/loader/loader-plugin-raw.sys.mjs @@ -2,8 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -"use strict"; - const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); /** @@ -12,7 +10,7 @@ const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); * This function handles "raw!" and "theme-loader!" requires. * See also: https://github.com/webpack/raw-loader. */ -const requireRawId = function(id, require) { +export const requireRawId = function(id, require) { const index = id.indexOf("!"); const rawId = id.slice(index + 1); let uri = require.resolve(rawId); @@ -39,5 +37,3 @@ const requireRawId = function(id, require) { // result here. return data; }; - -const EXPORTED_SYMBOLS = ["requireRawId"]; diff --git a/devtools/shared/loader/moz.build b/devtools/shared/loader/moz.build index 29ca2da741b5..33a5046fd8f7 100644 --- a/devtools/shared/loader/moz.build +++ b/devtools/shared/loader/moz.build @@ -14,7 +14,7 @@ if CONFIG["MOZ_DEVTOOLS"] == "all": DevToolsModules( "base-loader.js", "builtin-modules.js", - "loader-plugin-raw.jsm", + "loader-plugin-raw.sys.mjs", "Loader.jsm", "worker-loader.js", )