Skip to content

Commit

Permalink
Update some references to use ESM rather than CJS
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Apr 4, 2022
1 parent bcb1cfd commit becc386
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion addons/links/react.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./dist/cjs/react');
module.exports = require('./dist/esm/react');
4 changes: 2 additions & 2 deletions app/angular/src/server/framework-preset-angular-cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,8 @@ const newWebpackConfiguration = (
bail: false,
devtool: 'cheap-module-source-map',
entry: [
'/Users/joe/storybook/lib/core-server/dist/cjs/globals/polyfills.js',
'/Users/joe/storybook/lib/core-server/dist/cjs/globals/globals.js',
'/Users/joe/storybook/lib/core-server/dist/esm/globals/polyfills.js',
'/Users/joe/storybook/lib/core-server/dist/esm/globals/globals.js',
'/Users/joe/storybook/examples/angular-cli/.storybook/storybook-init-framework-entry.js',
'/Users/joe/storybook/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js',
'/Users/joe/storybook/addons/docs/dist/esm/frameworks/angular/config.js-generated-other-entry.js',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
// eslint-disable-next-line import/no-extraneous-dependencies
import { drawSelectedElement } from '@storybook/addon-measure/dist/cjs/box-model/visualizer';
import { drawSelectedElement } from '@storybook/addon-measure/dist/esm/box-model/visualizer';
// eslint-disable-next-line import/no-extraneous-dependencies
import { init, destroy } from '@storybook/addon-measure/dist/cjs/box-model/canvas';
import { init, destroy } from '@storybook/addon-measure/dist/esm/box-model/canvas';

export const ShadowRoot = ({ label = 'Hello from shadow DOM', drawMode = 'ROOT' }) => {
const ref = React.useRef();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
// eslint-disable-next-line import/no-extraneous-dependencies
import { drawSelectedElement } from '@storybook/addon-measure/dist/cjs/box-model/visualizer';
import { drawSelectedElement } from '@storybook/addon-measure/dist/esm/box-model/visualizer';
// eslint-disable-next-line import/no-extraneous-dependencies
import { init, destroy } from '@storybook/addon-measure/dist/cjs/box-model/canvas';
import { init, destroy } from '@storybook/addon-measure/dist/esm/box-model/canvas';

export const Visualization = ({ render }) => {
const element = useRef(null);
Expand Down
2 changes: 1 addition & 1 deletion lib/components/html.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./dist/cjs/html');
module.exports = require('./dist/esm/html');
2 changes: 1 addition & 1 deletion lib/core/client.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./dist/cjs/index');
module.exports = require('./dist/esm/index');
2 changes: 1 addition & 1 deletion lib/router/utils.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./dist/cjs/utils');
module.exports = require('./dist/esm/utils');
2 changes: 1 addition & 1 deletion lib/theming/create.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./dist/cjs/create');
module.exports = require('./dist/esm/create');

0 comments on commit becc386

Please sign in to comment.