Update some references to use ESM rather than CJS

This commit is contained in:
Tom Coleman 2022-04-04 17:50:05 +10:00
parent bcb1cfdfe6
commit becc386566
8 changed files with 11 additions and 11 deletions

View File

@ -1 +1 @@
module.exports = require('./dist/cjs/react');
module.exports = require('./dist/esm/react');

View File

@ -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',

View File

@ -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();

View File

@ -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);

View File

@ -1 +1 @@
module.exports = require('./dist/cjs/html');
module.exports = require('./dist/esm/html');

View File

@ -1 +1 @@
module.exports = require('./dist/cjs/index');
module.exports = require('./dist/esm/index');

View File

@ -1 +1 @@
module.exports = require('./dist/cjs/utils');
module.exports = require('./dist/esm/utils');

View File

@ -1 +1 @@
module.exports = require('./dist/cjs/create');
module.exports = require('./dist/esm/create');