mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 21:41:21 +08:00
Merge pull request #5715 from storybooks/tech/upgrade-telejson
UPGRADE telejson
This commit is contained in:
parent
cdf2265dbe
commit
4c261fb136
@ -23,7 +23,7 @@
|
||||
"@storybook/channels": "5.0.0-rc.5",
|
||||
"@storybook/client-logger": "5.0.0-rc.5",
|
||||
"global": "^4.3.2",
|
||||
"telejson": "^1.0.1"
|
||||
"telejson": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/json-stringify-safe": "^5.0.0"
|
||||
|
@ -38,7 +38,6 @@
|
||||
"babel-plugin-add-react-displayname": "^0.0.5",
|
||||
"babel-plugin-emotion": "^10.0.7",
|
||||
"babel-plugin-macros": "^2.4.5",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babel-preset-minify": "^0.5.0 || 0.6.0-alpha.5",
|
||||
"boxen": "^2.1.0",
|
||||
"case-sensitive-paths-webpack-plugin": "^2.2.0",
|
||||
|
@ -11,25 +11,3 @@ export default options => ({
|
||||
include: includePaths,
|
||||
exclude: excludePaths,
|
||||
});
|
||||
|
||||
export const nodeModulesBabelLoader = {
|
||||
test: /\.js$/,
|
||||
include: /\/node_modules\/safe-eval\//,
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
cacheDirectory: true,
|
||||
babelrc: false,
|
||||
presets: [
|
||||
[
|
||||
'env',
|
||||
{
|
||||
modules: 'commonjs',
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -10,7 +10,7 @@ import findCacheDir from 'find-cache-dir';
|
||||
import { version } from '../../../package.json';
|
||||
import { getManagerHeadHtml } from '../utils/template';
|
||||
import { loadEnv } from '../config/utils';
|
||||
import babelLoader, { nodeModulesBabelLoader } from '../common/babel-loader';
|
||||
import babelLoader from '../common/babel-loader';
|
||||
|
||||
const coreDirName = path.dirname(require.resolve('@storybook/core/package.json'));
|
||||
const context = path.join(coreDirName, '../../node_modules');
|
||||
@ -59,7 +59,7 @@ export default ({ configDir, configType, entries, dll, outputDir, cache, babelOp
|
||||
new Dotenv({ silent: true }),
|
||||
].filter(Boolean),
|
||||
module: {
|
||||
rules: [babelLoader(babelOptions), nodeModulesBabelLoader],
|
||||
rules: [babelLoader(babelOptions)],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.mjs', '.js', '.jsx', '.json'],
|
||||
|
@ -7,7 +7,7 @@ import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModul
|
||||
import TerserWebpackPlugin from 'terser-webpack-plugin';
|
||||
import resolveFrom from 'resolve-from';
|
||||
|
||||
import babelLoader, { nodeModulesBabelLoader } from '../common/babel-loader';
|
||||
import babelLoader from '../common/babel-loader';
|
||||
import { nodeModulesPaths, loadEnv } from '../config/utils';
|
||||
import { getPreviewHeadHtml, getPreviewBodyHtml } from '../utils/template';
|
||||
|
||||
@ -68,7 +68,6 @@ export default ({
|
||||
module: {
|
||||
rules: [
|
||||
babelLoader(babelOptions),
|
||||
nodeModulesBabelLoader,
|
||||
{
|
||||
test: /\.md$/,
|
||||
use: [
|
||||
|
@ -20052,9 +20052,10 @@ tar@^4, tar@^4.4.8:
|
||||
safe-buffer "^5.1.2"
|
||||
yallist "^3.0.2"
|
||||
|
||||
telejson@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/telejson/-/telejson-1.0.1.tgz#1457985fce02f1f054b626b7fcdc53fa54191b94"
|
||||
telejson@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/telejson/-/telejson-2.0.0.tgz#3bde0d8efc73b9410e51519e8f1e3952d51bafa3"
|
||||
integrity sha512-NfJ8FLvYk7RiwBWw3QfsPz4kUK7lOFhL1KrtumlSnc9XAeD87T10ZrsfP3tbJdsPEPdwWA78x5VCEHtcs9foYQ==
|
||||
dependencies:
|
||||
global "^4.3.2"
|
||||
is-function "^1.0.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user