diff --git a/packages/click-to-react-component/index.mjs b/packages/click-to-react-component/index.js similarity index 93% rename from packages/click-to-react-component/index.mjs rename to packages/click-to-react-component/index.js index 23082d4..4c2fc39 100644 --- a/packages/click-to-react-component/index.mjs +++ b/packages/click-to-react-component/index.js @@ -1,4 +1,4 @@ -import { ClickToComponent as Component } from './src/ClickToComponent.mjs' +import { ClickToComponent as Component } from './src/ClickToComponent.js' export const ClickToComponent = process.env.NODE_ENV === 'development' ? Component : () => null diff --git a/packages/click-to-react-component/package.json b/packages/click-to-react-component/package.json index 3093a8a..62c6de8 100644 --- a/packages/click-to-react-component/package.json +++ b/packages/click-to-react-component/package.json @@ -1,4 +1,5 @@ { + "type": "module", "name": "click-to-react-component", "version": "1.0.1", "description": "Option+Click your React components in your browser to open the source file in VS Code", diff --git a/packages/click-to-react-component/src/ClickToComponent.mjs b/packages/click-to-react-component/src/ClickToComponent.js similarity index 96% rename from packages/click-to-react-component/src/ClickToComponent.mjs rename to packages/click-to-react-component/src/ClickToComponent.js index 34a3fe8..16939a7 100644 --- a/packages/click-to-react-component/src/ClickToComponent.mjs +++ b/packages/click-to-react-component/src/ClickToComponent.js @@ -7,9 +7,9 @@ import { FloatingPortal } from '@floating-ui/react-dom-interactions' import { html } from 'htm/react' import * as React from 'react' -import { ContextMenu } from './ContextMenu.mjs' -import { getPathToSource } from './getPathToSource.mjs' -import { getSourceForElement } from './getSourceForElement.mjs' +import { ContextMenu } from './ContextMenu.js' +import { getPathToSource } from './getPathToSource.js' +import { getSourceForElement } from './getSourceForElement.js' export const State = /** @type {const} */ ({ IDLE: 'IDLE', diff --git a/packages/click-to-react-component/src/ContextMenu.mjs b/packages/click-to-react-component/src/ContextMenu.js similarity index 98% rename from packages/click-to-react-component/src/ContextMenu.mjs rename to packages/click-to-react-component/src/ContextMenu.js index f3503d9..6b0bcc6 100644 --- a/packages/click-to-react-component/src/ContextMenu.mjs +++ b/packages/click-to-react-component/src/ContextMenu.js @@ -23,11 +23,11 @@ import { html } from 'htm/react' import * as React from 'react' import mergeRefs from 'react-merge-refs' -import { getDisplayNameForInstance } from './getDisplayNameFromReactInstance.mjs' -import { getPathToSource } from './getPathToSource.mjs' -import { getPropsForInstance } from './getPropsForInstance.mjs' -import { getReactInstancesForElement } from './getReactInstancesForElement.mjs' -import { getSourceForInstance } from './getSourceForInstance.mjs' +import { getDisplayNameForInstance } from './getDisplayNameFromReactInstance.js' +import { getPathToSource } from './getPathToSource.js' +import { getPropsForInstance } from './getPropsForInstance.js' +import { getReactInstancesForElement } from './getReactInstancesForElement.js' +import { getSourceForInstance } from './getSourceForInstance.js' export const ContextMenu = React.forwardRef( ( diff --git a/packages/click-to-react-component/src/getDisplayNameFromReactInstance.mjs b/packages/click-to-react-component/src/getDisplayNameFromReactInstance.js similarity index 100% rename from packages/click-to-react-component/src/getDisplayNameFromReactInstance.mjs rename to packages/click-to-react-component/src/getDisplayNameFromReactInstance.js diff --git a/packages/click-to-react-component/src/getPathToSource.mjs b/packages/click-to-react-component/src/getPathToSource.js similarity index 100% rename from packages/click-to-react-component/src/getPathToSource.mjs rename to packages/click-to-react-component/src/getPathToSource.js diff --git a/packages/click-to-react-component/src/getPropsForInstance.mjs b/packages/click-to-react-component/src/getPropsForInstance.js similarity index 100% rename from packages/click-to-react-component/src/getPropsForInstance.mjs rename to packages/click-to-react-component/src/getPropsForInstance.js diff --git a/packages/click-to-react-component/src/getReactInstanceForElement.mjs b/packages/click-to-react-component/src/getReactInstanceForElement.js similarity index 100% rename from packages/click-to-react-component/src/getReactInstanceForElement.mjs rename to packages/click-to-react-component/src/getReactInstanceForElement.js diff --git a/packages/click-to-react-component/src/getReactInstancesForElement.mjs b/packages/click-to-react-component/src/getReactInstancesForElement.js similarity index 96% rename from packages/click-to-react-component/src/getReactInstancesForElement.mjs rename to packages/click-to-react-component/src/getReactInstancesForElement.js index 89ff36f..5e20325 100644 --- a/packages/click-to-react-component/src/getReactInstancesForElement.mjs +++ b/packages/click-to-react-component/src/getReactInstancesForElement.js @@ -2,7 +2,7 @@ * @typedef {import('react-reconciler').Fiber} Fiber */ -import { getReactInstanceForElement } from './getReactInstanceForElement.mjs' +import { getReactInstanceForElement } from './getReactInstanceForElement.js' export function getReactInstancesForElement( /** @type {HTMLElement} */ diff --git a/packages/click-to-react-component/src/getSourceForElement.mjs b/packages/click-to-react-component/src/getSourceForElement.js similarity index 84% rename from packages/click-to-react-component/src/getSourceForElement.mjs rename to packages/click-to-react-component/src/getSourceForElement.js index 5b736d0..8d116ea 100644 --- a/packages/click-to-react-component/src/getSourceForElement.mjs +++ b/packages/click-to-react-component/src/getSourceForElement.js @@ -1,5 +1,5 @@ -import { getReactInstanceForElement } from './getReactInstanceForElement.mjs' -import { getSourceForInstance } from './getSourceForInstance.mjs' +import { getReactInstanceForElement } from './getReactInstanceForElement.js' +import { getSourceForInstance } from './getSourceForInstance.js' /** * @typedef {import('react-reconciler').Fiber} Fiber diff --git a/packages/click-to-react-component/src/getSourceForInstance.mjs b/packages/click-to-react-component/src/getSourceForInstance.js similarity index 100% rename from packages/click-to-react-component/src/getSourceForInstance.mjs rename to packages/click-to-react-component/src/getSourceForInstance.js