mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 20:51:07 +08:00
Remove dotenv-webpack
This commit is contained in:
parent
ea3af92a3a
commit
255bc81180
@ -86,7 +86,6 @@
|
||||
"case-sensitive-paths-webpack-plugin": "^2.3.0",
|
||||
"core-js": "^3.8.2",
|
||||
"css-loader": "^3.6.0",
|
||||
"dotenv-webpack": "^1.8.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"find-up": "^5.0.0",
|
||||
"fork-ts-checker-webpack-plugin": "^4.1.6",
|
||||
@ -114,7 +113,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/case-sensitive-paths-webpack-plugin": "^2.1.4",
|
||||
"@types/dotenv-webpack": "^3.0.0",
|
||||
"@types/react-dev-utils": "^9.0.4",
|
||||
"@types/terser-webpack-plugin": "^5.0.2",
|
||||
"@types/webpack-dev-middleware": "^3.7.3",
|
||||
|
@ -1,6 +1,5 @@
|
||||
import path from 'path';
|
||||
import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } from 'webpack';
|
||||
import Dotenv from 'dotenv-webpack';
|
||||
// @ts-ignore
|
||||
import { Configuration, RuleSetRule } from '@types/webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
@ -214,7 +213,6 @@ export default async (options: Options & Record<string, any>): Promise<Configura
|
||||
isProd ? null : new HotModuleReplacementPlugin(),
|
||||
new CaseSensitivePathsPlugin(),
|
||||
quiet ? null : new ProgressPlugin({}),
|
||||
new Dotenv({ silent: true }),
|
||||
shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null,
|
||||
].filter(Boolean),
|
||||
module: {
|
||||
|
@ -82,7 +82,6 @@
|
||||
"case-sensitive-paths-webpack-plugin": "^2.3.0",
|
||||
"core-js": "^3.8.2",
|
||||
"css-loader": "^5.0.1",
|
||||
"dotenv-webpack": "^7.0.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.0.4",
|
||||
"glob": "^7.1.6",
|
||||
"glob-promise": "^3.4.0",
|
||||
@ -100,7 +99,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/case-sensitive-paths-webpack-plugin": "^2.1.4",
|
||||
"@types/dotenv-webpack": "^5.0.0",
|
||||
"@types/react-dev-utils": "^9.0.4",
|
||||
"@types/terser-webpack-plugin": "^5.0.2",
|
||||
"@types/webpack-dev-middleware": "^4.1.0",
|
||||
|
@ -1,6 +1,5 @@
|
||||
import path from 'path';
|
||||
import { Configuration, DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } from 'webpack';
|
||||
import Dotenv from 'dotenv-webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
||||
import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
|
||||
@ -18,7 +17,6 @@ import {
|
||||
handlebars,
|
||||
interpolate,
|
||||
Options,
|
||||
hasDotenv,
|
||||
NormalizedStoriesSpecifier,
|
||||
toImportFn,
|
||||
normalizeStories,
|
||||
@ -214,7 +212,6 @@ export default async (options: Options & Record<string, any>): Promise<Configura
|
||||
isProd ? null : new HotModuleReplacementPlugin(),
|
||||
new CaseSensitivePathsPlugin(),
|
||||
quiet ? null : new ProgressPlugin({}),
|
||||
hasDotenv() ? new Dotenv({ silent: true }) : null,
|
||||
shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null,
|
||||
].filter(Boolean),
|
||||
module: {
|
||||
|
@ -22,7 +22,6 @@ export * from './utils/template';
|
||||
export * from './utils/interpolate';
|
||||
export * from './utils/validate-configuration-files';
|
||||
export * from './utils/to-require-context';
|
||||
export * from './utils/has-dotenv';
|
||||
export * from './utils/normalize-stories';
|
||||
export * from './utils/to-importFn';
|
||||
export * from './utils/readTemplate';
|
||||
|
@ -1,10 +0,0 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
/**
|
||||
* Is there a .env file in the current directory?
|
||||
*
|
||||
* This is the default behavior of `dotenv-webpack-plugin`
|
||||
* https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
|
||||
*/
|
||||
export const hasDotenv = () => fs.existsSync(path.join('.', '.env'));
|
@ -58,7 +58,6 @@
|
||||
"chalk": "^4.1.0",
|
||||
"core-js": "^3.8.2",
|
||||
"css-loader": "^3.6.0",
|
||||
"dotenv-webpack": "^1.8.0",
|
||||
"express": "^4.17.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"file-system-cache": "^1.0.5",
|
||||
@ -82,7 +81,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/case-sensitive-paths-webpack-plugin": "^2.1.4",
|
||||
"@types/dotenv-webpack": "^3.0.0",
|
||||
"@types/terser-webpack-plugin": "^5.0.2",
|
||||
"@types/webpack-dev-middleware": "^3.7.3",
|
||||
"@types/webpack-virtual-modules": "^0.1.0"
|
||||
|
@ -1,7 +1,6 @@
|
||||
import path from 'path';
|
||||
import fse from 'fs-extra';
|
||||
import { DefinePlugin, Configuration, WebpackPluginInstance } from 'webpack';
|
||||
import Dotenv from 'dotenv-webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
||||
import PnpWebpackPlugin from 'pnp-webpack-plugin';
|
||||
@ -110,7 +109,6 @@ export async function managerWebpack(
|
||||
template,
|
||||
}) as any) as WebpackPluginInstance,
|
||||
(new CaseSensitivePathsPlugin() as any) as WebpackPluginInstance,
|
||||
(new Dotenv({ silent: true }) as any) as WebpackPluginInstance,
|
||||
// graphql sources check process variable
|
||||
new DefinePlugin({
|
||||
...stringifyProcessEnvs(envs),
|
||||
|
@ -57,7 +57,6 @@
|
||||
"chalk": "^4.1.0",
|
||||
"core-js": "^3.8.2",
|
||||
"css-loader": "^5.0.1",
|
||||
"dotenv-webpack": "^7.0.0",
|
||||
"express": "^4.17.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"file-system-cache": "^1.0.5",
|
||||
@ -80,7 +79,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/case-sensitive-paths-webpack-plugin": "^2.1.4",
|
||||
"@types/dotenv-webpack": "^5.0.0",
|
||||
"@types/terser-webpack-plugin": "^5.0.2",
|
||||
"@types/webpack-dev-middleware": "^4.1.0",
|
||||
"@types/webpack-virtual-modules": "^0.1.0"
|
||||
|
@ -1,7 +1,6 @@
|
||||
import path from 'path';
|
||||
import fse from 'fs-extra';
|
||||
import { DefinePlugin, Configuration, WebpackPluginInstance } from 'webpack';
|
||||
import Dotenv from 'dotenv-webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
||||
import VirtualModulePlugin from 'webpack-virtual-modules';
|
||||
@ -20,7 +19,6 @@ import {
|
||||
getManagerMainTemplate,
|
||||
Options,
|
||||
ManagerWebpackOptions,
|
||||
hasDotenv,
|
||||
} from '@storybook/core-common';
|
||||
|
||||
import { babelLoader } from './babel-loader-manager';
|
||||
@ -110,7 +108,6 @@ export async function managerWebpack(
|
||||
template,
|
||||
}) as any) as WebpackPluginInstance,
|
||||
(new CaseSensitivePathsPlugin() as any) as WebpackPluginInstance,
|
||||
hasDotenv() ? new Dotenv({ silent: true }) : null,
|
||||
// graphql sources check process variable
|
||||
new DefinePlugin({
|
||||
...stringifyProcessEnvs(envs),
|
||||
|
73
yarn.lock
73
yarn.lock
@ -7636,7 +7636,6 @@ __metadata:
|
||||
"@storybook/theming": 6.4.0-alpha.39
|
||||
"@storybook/ui": 6.4.0-alpha.39
|
||||
"@types/case-sensitive-paths-webpack-plugin": ^2.1.4
|
||||
"@types/dotenv-webpack": ^3.0.0
|
||||
"@types/node": ^14.0.10
|
||||
"@types/react-dev-utils": ^9.0.4
|
||||
"@types/terser-webpack-plugin": ^5.0.2
|
||||
@ -7651,7 +7650,6 @@ __metadata:
|
||||
case-sensitive-paths-webpack-plugin: ^2.3.0
|
||||
core-js: ^3.8.2
|
||||
css-loader: ^3.6.0
|
||||
dotenv-webpack: ^1.8.0
|
||||
file-loader: ^6.2.0
|
||||
find-up: ^5.0.0
|
||||
fork-ts-checker-webpack-plugin: ^4.1.6
|
||||
@ -7725,7 +7723,6 @@ __metadata:
|
||||
"@storybook/store": 6.4.0-alpha.39
|
||||
"@storybook/theming": 6.4.0-alpha.39
|
||||
"@types/case-sensitive-paths-webpack-plugin": ^2.1.4
|
||||
"@types/dotenv-webpack": ^5.0.0
|
||||
"@types/node": ^14.0.10
|
||||
"@types/react-dev-utils": ^9.0.4
|
||||
"@types/terser-webpack-plugin": ^5.0.2
|
||||
@ -7738,7 +7735,6 @@ __metadata:
|
||||
case-sensitive-paths-webpack-plugin: ^2.3.0
|
||||
core-js: ^3.8.2
|
||||
css-loader: ^5.0.1
|
||||
dotenv-webpack: ^7.0.0
|
||||
fork-ts-checker-webpack-plugin: ^6.0.4
|
||||
glob: ^7.1.6
|
||||
glob-promise: ^3.4.0
|
||||
@ -8347,7 +8343,6 @@ __metadata:
|
||||
"@storybook/theming": 6.4.0-alpha.39
|
||||
"@storybook/ui": 6.4.0-alpha.39
|
||||
"@types/case-sensitive-paths-webpack-plugin": ^2.1.4
|
||||
"@types/dotenv-webpack": ^3.0.0
|
||||
"@types/node": ^14.0.10
|
||||
"@types/terser-webpack-plugin": ^5.0.2
|
||||
"@types/webpack": ^4.41.26
|
||||
@ -8358,7 +8353,6 @@ __metadata:
|
||||
chalk: ^4.1.0
|
||||
core-js: ^3.8.2
|
||||
css-loader: ^3.6.0
|
||||
dotenv-webpack: ^1.8.0
|
||||
express: ^4.17.1
|
||||
file-loader: ^6.2.0
|
||||
file-system-cache: ^1.0.5
|
||||
@ -8402,7 +8396,6 @@ __metadata:
|
||||
"@storybook/theming": 6.4.0-alpha.39
|
||||
"@storybook/ui": 6.4.0-alpha.39
|
||||
"@types/case-sensitive-paths-webpack-plugin": ^2.1.4
|
||||
"@types/dotenv-webpack": ^5.0.0
|
||||
"@types/node": ^14.0.10
|
||||
"@types/terser-webpack-plugin": ^5.0.2
|
||||
"@types/webpack-dev-middleware": ^4.1.0
|
||||
@ -8412,7 +8405,6 @@ __metadata:
|
||||
chalk: ^4.1.0
|
||||
core-js: ^3.8.2
|
||||
css-loader: ^5.0.1
|
||||
dotenv-webpack: ^7.0.0
|
||||
express: ^4.17.1
|
||||
file-loader: ^6.2.0
|
||||
file-system-cache: ^1.0.5
|
||||
@ -9793,24 +9785,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/dotenv-webpack@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "@types/dotenv-webpack@npm:3.0.0"
|
||||
dependencies:
|
||||
"@types/webpack": "*"
|
||||
checksum: cac2e822b2c018ad3e15931110a5d7d36d1beb4fd77f3aac7c3ee3c1cf6e0cb43a1269b23e16a3b90175b1d3a22001592b0897fc69517d36a7b695b0d9393691
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/dotenv-webpack@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "@types/dotenv-webpack@npm:5.0.0"
|
||||
dependencies:
|
||||
"@types/webpack": "*"
|
||||
checksum: 0ab43f947eb5bc087ccb7adb3ee2573508af8c17ae376e3df8973b084934c7f15b10971dca9d288b2bbe493c45d6d29227cbc353493b0f05f2f2ae29d22f28ad
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/enzyme@npm:^3.10.8":
|
||||
version: 3.10.8
|
||||
resolution: "@types/enzyme@npm:3.10.8"
|
||||
@ -19880,24 +19854,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dotenv-defaults@npm:^1.0.2":
|
||||
version: 1.1.1
|
||||
resolution: "dotenv-defaults@npm:1.1.1"
|
||||
dependencies:
|
||||
dotenv: ^6.2.0
|
||||
checksum: c1304b7c83cbc310b0fa2a9256cf60caa0221d8b240b9e520f59bcdf3dfcfcf6a6d322250e787b6b770e21a17e7fdf56b6371e0b9a515d58d1159e7042a7caef
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dotenv-defaults@npm:^2.0.2":
|
||||
version: 2.0.2
|
||||
resolution: "dotenv-defaults@npm:2.0.2"
|
||||
dependencies:
|
||||
dotenv: ^8.2.0
|
||||
checksum: 14b7b8f6c21a30404106384398728746e63405bfeabe47ef7aadd0e81de49986d5896a612e5b1acddf655af6472a24947b7b113aa3ef3270a2877afa9c5bd287
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dotenv-expand@npm:5.1.0, dotenv-expand@npm:^5.1.0":
|
||||
version: 5.1.0
|
||||
resolution: "dotenv-expand@npm:5.1.0"
|
||||
@ -19905,28 +19861,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dotenv-webpack@npm:^1.8.0":
|
||||
version: 1.8.0
|
||||
resolution: "dotenv-webpack@npm:1.8.0"
|
||||
dependencies:
|
||||
dotenv-defaults: ^1.0.2
|
||||
peerDependencies:
|
||||
webpack: ^1 || ^2 || ^3 || ^4
|
||||
checksum: 64ec3b4c2fcb6cc65195c2a44778d47d5b38478ec3663b95a465b3cb392a6436def96393eff92780dc53f4b35bef67589d0fc19812503acbc9ec015a6bf45b3b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dotenv-webpack@npm:^7.0.0":
|
||||
version: 7.0.3
|
||||
resolution: "dotenv-webpack@npm:7.0.3"
|
||||
dependencies:
|
||||
dotenv-defaults: ^2.0.2
|
||||
peerDependencies:
|
||||
webpack: ^4 || ^5
|
||||
checksum: 1209f72c980989a4de550e6be7fab9efe7c34f56496760e8b91cd577ddba461b36acbb7de3a56416e60af9ef67c9b7d224bdf6a61e4dca60e23dc8e1673a16eb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dotenv@npm:8.2.0, dotenv@npm:^8.0.0, dotenv@npm:^8.2.0":
|
||||
version: 8.2.0
|
||||
resolution: "dotenv@npm:8.2.0"
|
||||
@ -19941,13 +19875,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dotenv@npm:^6.2.0":
|
||||
version: 6.2.0
|
||||
resolution: "dotenv@npm:6.2.0"
|
||||
checksum: 56886938622c34255c89ec24d584460668a5ca035afe37da7b16bfbac36f8b352d20a6dde51000b30db04fa5cac7b03caf165919fe5e9bd8c91a2735fd61c649
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"downlevel-dts@npm:^0.6.0":
|
||||
version: 0.6.0
|
||||
resolution: "downlevel-dts@npm:0.6.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user