Releases: tajo/ladle
@ladle/[email protected]
@ladle/[email protected]
Minor Changes
-
#162
ff731f5
Thanks @kazuma1989! - Load vite.config.ts the same way as ViteWHAT the breaking change is
(Only for the package maintainers) a new E2E packages is added.
WHY the change was made
Ladle was not able to handle
vite.config.ts
the way Vite does.
For example, Ladle was not able to loadvite.config.ts
which imported other TS modules.HOW a consumer should update their code
(Only for the package maintainers) recognize a new e2e workspace with
pnpm install
. -
#156
0e316d6
Thanks @tajo! - Reuse the same tab for Ladle serve when the env is Google Chrome and OSX.
@ladle/[email protected]
@ladle/[email protected]
Major Changes
- #153
05bee5d
Thanks @tajo! - - Ladle now loads top-levelvite.config.js/ts/mjs
and uses all its options.- All Vite related options from
config.mjs
removed and an error will be thrown, usevite.config.js
instead. enableFlow
option removed, you can create your own plugin (check our e2e/flow test).- Programmatic API imports changed to
@ladle/react/serve
and@ladle/react/build
. --out
renamed to--outDir
to mimic Vite configuration, added-o
alias,outDir
moved to top-level inconfig.mjs
.--port
has alias-p
,port
moved to top-level inconfig.mjs
.vite.config.js
can be customized throughviteConfig
and--viteConfig
.--base-url
removed, usebase
invite.config.js
.--open
removed, useserver.open
invite.config.js
.--sourcemap
removed, usebuild.sourcemap
invite.config.js
.
- All Vite related options from
Patch Changes
@ladle/[email protected]
@ladle/[email protected]
@ladle/[email protected]
Patch Changes
-
#134
2351356
Thanks @tajo! - Stories with controls defined through ArgTypes only (and not args at the same time) caused runtime error -
#133
f0a42ad
Thanks @tajo! - Add explicit types for children of GlobalProvider (required for React 18 compatibility) -
#137
515d069
Thanks @tajo! - Allow typescript typecast default export syntax when parsing stories. -
#135
c027c8c
Thanks @tajo! - Surface all errors that happen during the story discovery (parsing) stage. Show them in the UI (a new landing page) and the CLI. Adds information how to deal with them as well. -
#136
fa8db60
Thanks @tajo! - Undo some basic CSS resets from normalize/preflight that impact Ladle's UI when used. -
#138
e2069f4
Thanks @tajo! - Add a section explaining the limitations of story syntax - some parts need to be static so they can be parsed. -
#126
0a44aa2
Thanks @beckend! - feat: allow configuration of the whole Vite config.resolve object
@ladle/[email protected]
Support tsconfig paths, css.modules and other improvements
- build: add husky hooks to check formatting and commit messages locally: We enforce conventional commits and prettier in the CI, this also adds pre-commit hooks so developers get the feedback early and locally.
- feat: add vite-tsconfig-paths plugin and allow add custom vite plugins: If you alias some of your imports and use TS/tsconfig, Ladle now includes these paths automatically.
- chore: update vite version
- feat: make flow types support opt-in: Ladle supported flow types by default; however, they bring some serious performance hit since esbuild can't process them without a JS plugin. The support is now optional and you have to opt-in through
enableFlow: true
. - docs: improve no stories found landing page
- feat: add css.modules option into the config - You can now pass all the
css.modules
options to Vite