This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add warning that config options don't affect vite
- Loading branch information
Shaun Lloyd
committed
Apr 24, 2023
1 parent
4c042fb
commit 5067355
Showing
10 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import { webpackFinal as webpack } from "./webpack/webpackFinal"; | ||
import { viteFinal as vite } from "./vite/viteFinal"; | ||
|
||
export const webpackFinal = webpack as any; | ||
|
||
export const viteFinal = vite as any; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { logger, colors } from "@storybook/node-logger"; | ||
import type { AddonStylingOptions } from "../types"; | ||
|
||
export function viteFinal(config: any, options: AddonStylingOptions = {}) { | ||
if (options.cssModules) { | ||
logger.warn( | ||
`[@storybook/addon-styling] "${colors.blue( | ||
"options.cssModules" | ||
)}" is for webpack only. Vite comes preconfigured with css-module support.` | ||
); | ||
} | ||
if (options.cssBuildRule) { | ||
logger.warn( | ||
`[@storybook/addon-styling] "${colors.blue( | ||
"options.cssBuildRule" | ||
)}" is for webpack only. To customize your CSS build, update your Vite config.` | ||
); | ||
} | ||
|
||
if (options.postCss) { | ||
logger.warn( | ||
`[@storybook/addon-styling] "${colors.blue( | ||
"options.postCss" | ||
)}" is for webpack only. Vite comes preconfigured with PostCSS support.` | ||
); | ||
} | ||
|
||
if (options.sass) { | ||
logger.warn( | ||
`[@storybook/addon-styling] "${colors.blue( | ||
"options.sass" | ||
)}" is for webpack only. Vite comes preconfigured with Sass/Scss support.` | ||
); | ||
} | ||
if (options.scssBuildRule) { | ||
logger.warn( | ||
`[@storybook/addon-styling] "${colors.blue( | ||
"options.scssBuildRule" | ||
)}" is for webpack only. Vite comes preconfigured with Sass/Scss support.` | ||
); | ||
} | ||
|
||
if (options.less) { | ||
logger.warn( | ||
`[@storybook/addon-styling] "${colors.blue( | ||
"options.less" | ||
)}" is for webpack only. Vite comes preconfigured with Less support.` | ||
); | ||
} | ||
if (options.lessBuildRule) { | ||
logger.warn( | ||
`[@storybook/addon-styling] "${colors.blue( | ||
"options.lessBuildRule" | ||
)}" is for webpack only. Vite comes preconfigured with Less support.` | ||
); | ||
} | ||
|
||
return config; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3163,6 +3163,16 @@ | |
npmlog "^5.0.1" | ||
pretty-hrtime "^1.0.3" | ||
|
||
"@storybook/node-logger@^7.0.7": | ||
version "7.0.7" | ||
resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-7.0.7.tgz#114e6d1994e0445dd9e579768bdb89adbf1055cd" | ||
integrity sha512-5Y4LLgKeCStq1ktCKZ5eNPzQQSQ+CYZAlkEdzQ3Pp//0KXaZvVxEvGtaYhAymP2HatLpI8Oneo4lHrJioRfgww== | ||
dependencies: | ||
"@types/npmlog" "^4.1.2" | ||
chalk "^4.1.0" | ||
npmlog "^5.0.1" | ||
pretty-hrtime "^1.0.3" | ||
|
||
"@storybook/[email protected]": | ||
version "7.0.2" | ||
resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-7.0.2.tgz#cccbecb5a52ef0797d72fd919f024d785b1fb8d6" | ||
|