Skip to content

Commit

Permalink
Merge pull request #17868 from storybookjs/tom/sb-232-get-rid-of-unne…
Browse files Browse the repository at this point in the history
…cessary-web-cjs

Update some references to use ESM rather than CJS
  • Loading branch information
shilman committed Apr 4, 2022
2 parents 7ffc089 + becc386 commit bcea801
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
@@ -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
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
@@ -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
@@ -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
@@ -1 +1 @@
module.exports = require('./dist/cjs/html');
module.exports = require('./dist/esm/html');
2 changes: 1 addition & 1 deletion lib/core/client.js
@@ -1 +1 @@
module.exports = require('./dist/cjs/index');
module.exports = require('./dist/esm/index');
2 changes: 1 addition & 1 deletion lib/router/utils.js
@@ -1 +1 @@
module.exports = require('./dist/cjs/utils');
module.exports = require('./dist/esm/utils');
2 changes: 1 addition & 1 deletion lib/theming/create.js
@@ -1 +1 @@
module.exports = require('./dist/cjs/create');
module.exports = require('./dist/esm/create');

0 comments on commit bcea801

Please sign in to comment.