- Updated dependencies []:
- @vanilla-extract/integration@7.1.12
- Updated dependencies []:
- @vanilla-extract/integration@7.1.11
- #1492
1fd348a
Thanks @kube! - Filter outreact-router
Vite plugin when creating thevite-node
compiler
-
#1482
30c0305
Thanks @askoufis! - Fixes a bug where Vanilla Extract files with extensions other thancss.ts
were not being invalidated during HMR -
Updated dependencies []:
- @vanilla-extract/integration@7.1.10
- Updated dependencies [
96dd466127374b21ad7e48e5dd168a03a96af047
]:- @vanilla-extract/integration@7.1.9
- Updated dependencies [
6668e9e069276b0fd9ccd9668403b4eeb840a11b
,61878f5fb21a33190ef242551c639e216ba4748a
]:- @vanilla-extract/integration@7.1.8
- #1438
765b85610207992693a822fb3b1aec995ab48409
Thanks @ArrayKnight! - Fixes a bug where changes to.css.ts
dependencies of top-level.css.ts
files would not generate new CSS
- Updated dependencies [
124c31c2d9fee24d937c4626cec524d527d4e55e
]:- @vanilla-extract/integration@7.1.7
-
#1395
8d1731b44f8e93153c8087a533e0f9b2ed99767c
Thanks @askoufis! - Fixes a bug that made the plugin incompatible with frameworks that use custom config files -
Updated dependencies []:
- @vanilla-extract/integration@7.1.6
-
#1335
b8a99e4980710a34692034d5da43e584edbc3d17
Thanks @askoufis! - Addtypes
field topackage.json
-
Updated dependencies [
b8a99e4980710a34692034d5da43e584edbc3d17
]:- @vanilla-extract/integration@7.1.5
- #1399
ce738ba9e9a6b5c72cc7868bed724c816ca3cc4e
Thanks @askoufis! - Ensure the compiler instance is re-used between builds
-
#1397
2232ef4aa0b8410ff791626a951a15cc03dfbb09
Thanks @askoufis! - Fixes a bug that was causing output CSS files to not update during watch mode -
Updated dependencies [
606660618dc5efa6c529f77cebf9d2b8dc379dbd
,e58cf9013c6f6cdfacb2a7936b3354e71138e9fb
]:- @vanilla-extract/integration@7.1.3
-
#1369
05ef2f0
Thanks @askoufis! - Fixes a bug where an internal Remix plugin would throw an error inside thevite-node
compiler -
#1368
90f0315
Thanks @askoufis! - Update@vanilla-extract/integration
dependencyThis fixes a bug where APIs that used the
walkObject
utility (e.g.createTheme
) would fail when used with module namespace objects insidevite-node
. This was due to the previous implementation using the input object'sconstructor
to initialize a clone, which does not work with module namespace objects because they do not have aconstructor
function. -
Updated dependencies [
c8aefe0
]:- @vanilla-extract/integration@7.1.2
- #1353
94d5f06
Thanks @himself65! - Movevite-node
compiler creation to a more appropriate plugin hook to ensure correct cleanup of resources
-
#1314
e8a6850
Thanks @mrm007! - Resolve and pass a new copy of the Vite config to the vite-node compilerPreviously, we were passing the same Vite config object to the vite-node compiler. This was causing compatibility issues with other plugins, such as Vitest and Remix.
-
Updated dependencies [
e8a6850
]:- @vanilla-extract/integration@7.1.0
-
#1309
fdafb6d
Thanks @mrm007! - Correctly resolve module paths when using Vite plugins that affect module resolution, such asvite-tsconfig-paths
-
#1308
20e33a5
Thanks @mrm007! - Don't pass Remix Vite plugin to the vite-node compilerRemix throws an error if it's loaded without a config file, which is what we do when we initialise the vite-node compiler.
-
Updated dependencies [
fdafb6d
]:- @vanilla-extract/integration@7.0.0
-
#1304
545bf82
Thanks @fukumasuya! - Pass Viteresolve
config to vite-node compilerThe plugin passes through the project's Vite
resolve
config to the vite-node compiler, which will be used for resolving imports. These options includeresolve.alias
,resolve.dedupe
,resolve.conditions
,resolve.mainFields
,resolve.extensions
, and others. -
Updated dependencies [
545bf82
]:- @vanilla-extract/integration@6.5.0
-
#1300
d0b84f6
Thanks @mrm007! - Skip loading plugins added by Vitest -
#1297
85e1131
Thanks @mrm007! - Correctly resolve the user's Vite plugins
-
#1264
e531c41
Thanks @mrm007! - The Vite plugin now uses a newer, faster, Vite-based compiler by default.The new compiler uses
vite-node
to parse and extract CSS from.css.ts
files. This comes with all the benefits of using Vite, faster builds and the ability to use Vite plugins.The new compiler has been used in Remix ever since support for Vanilla Extract was introduced.
-
#1264
e531c41
Thanks @mrm007! - The behaviour previously known asemitCssInSsr
has been turned on by default. TheemitCssInSsr
option has been removed.This means that the CSS emitted by the plugin is now processed by Vite, so the plugin no longer needs to resolve PostCSS plugins and process the CSS output itself.
-
#1264
e531c41
Thanks @mrm007! - TheesbuildOptions
option has been removed as we are no longer using esbuild internally
-
#1291
00af971
Thanks @mrm007! - Update dependency@vanilla-extract/integration
-
#1254
f373d7f
Thanks @EvgenNoskov! - Allow hyphens in class names when using a custom identifier
-
#1262
610c50b
Thanks @mrm007! - Update Babel config to target Node.js 14 -
#1262
610c50b
Thanks @mrm007! - Lazy load Vite to avoid the CJS warning -
Updated dependencies [
610c50b
,610c50b
]:- @vanilla-extract/integration@6.2.5
- #1250
bc349fd
Thanks @kosmotema! - Prevent unnecessary module invalidations when using PostCSS
-
#1239
1791df2
Thanks @markdalgleish! - DefaultemitCssInSsr
totrue
when Remix Vite plugin is present -
#1240
2cad138
Thanks @mrm007! - Add Vite 5 to peer dependencies -
Updated dependencies [
fd5d9fc
]:- @vanilla-extract/integration@6.2.4
- #1231
cdd5150
Thanks @mrm007! - Bumppostcss-load-config
to enable loading PostCSS configs defined as ES Modules
- #1160
e391bae
Thanks @SombreroElGringo! - Users can now provide a custom identifier hashing function
- #1093
8bed6f5
Thanks @kosmotema! - Fix HMR in Windows by normalizing paths fromwatchFiles
- #1066
0d0ea39
Thanks @askoufis! - Fix stale emitted CSS in SSR mode by invalidating all modules related to a file
-
#989
669a61f
Thanks @michaeltaranto! - AddemitCssInSsr
optionProvides the ability to opt in to emitting CSS during SSR.
// vite.config.js import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; export default { plugins: [ vanillaExtractPlugin({ emitCssInSsr: true }) ] };
-
#952
a677c46
Thanks @endigma! - Whitelistvite-plugin-svelte
to enable emitting CSS on the server -
Updated dependencies [
eea3c7d
,cc60aa8
]:- @vanilla-extract/integration@6.0.2
- Updated dependencies [
2d08761
]:- @vanilla-extract/integration@6.0.1
- #845
b6aa8b6
Thanks @tom-sherman! - Adds vite v3 to peer dependencies
-
#827
9cfb9a1
Thanks @mattcompiles! - Add automatic debug IDsAutomatic debug IDs allow your styles and other identifiers (e.g. CSS Vars, keyframes, etc) to have names that more closely reflect your source code when in development. This makes it easier to understand how the CSS output links to your source code.
// styles.css.ts // redBox ~= 'styles_redBox_asdfgj' const redBox = style({ background: 'red' });
- #825
ef905c3
Thanks @markdalgleish! - Add experimental support for SolidStart
- #796
ee83020
Thanks @mechairoi! - Add experimental support for Astro
- #781
4fb9a2c
Thanks @benjervis! - Adds a check for the existence of import.meta.hot before attempting to add an event listener to inject styles
- #751
8c4f71b
Thanks @frandiox! - Add experimental support for React Server Components
- #729
02ea735
Thanks @danielroe! - Generate CSS and not HMR code if vite server is present in production mode
- #668
e373b51
Thanks @AndrewLeedham! - Add esbuild configurations to vite/esbuild/rollup plugins
- Updated dependencies [
e373b51
]:- @vanilla-extract/integration@5.0.0
- #716
9b6f3ea
Thanks @mattcompiles! - Fix unresolvable imports inside monorepos
- #707
162b66f
Thanks @AndrewLeedham! - Fix styles not updating in dev mode
-
#673
f6d5337
Thanks @mattcompiles! - Fix issue where.css.ts
files with the same file path from other packages could have identifier collisions -
Updated dependencies [
f6d5337
]:- @vanilla-extract/integration@4.0.1
-
#647
3c9b7d9
Thanks @mattcompiles! - Use more realistic file paths for virtual CSS files -
Updated dependencies [
3c9b7d9
]:- @vanilla-extract/integration@4.0.0
- #628
6fa65ad
Thanks @mattcompiles! - Fix style imports from parent directories
-
#543
2c7abb1
Thanks @mattcompiles! - Ensure code is compatible with node 12 -
Updated dependencies [
2c7abb1
]:- @vanilla-extract/integration@2.0.1
-
#530
0d7f912
Thanks @benjervis! - Fix compatibility issues with vite@2.7Vite 2.7 introduced some breaking changes around the way SSR was indicated in plugins. The plugin has been updated to handle both the old and new formats, so it should support both 2.7 forward, as well as previous versions.
-
#517
64791f3
Thanks @benjervis! - Add postcss processing to the pluginVite supports postcss processing as a built in feature, but that's lost in dev mode with vanilla-extract because there are no actual css files for vite to pick up.
The vite plugin now manually runs postcss over the generated css in serve mode, if any postcss config was found.
- Updated dependencies [
64791f3
]:- @vanilla-extract/integration@2.0.0
- #470
a6383e8
Thanks @Katarina-UBCO! - Prefix.vanilla.js
and.vanilla.css
virtual modules withvirtual:vanilla-extract:
.
- #422
4e5ba05
Thanks @mattcompiles! - Remove thedevStyleRuntime
option
-
#422
4e5ba05
Thanks @mattcompiles! - Fix HMR for pre-existing CSSPreviously, styles would not hot reload correctly when returning to a previously cached version
-
#409
a9c5cb7
Thanks @benjervis! - Fix plugin for watch mode.The vite plugin previously relied on a one to one matching of resolve to load calls, and would clean up the CSS stored in memory after it was loaded.
This isn't true in
--watch
mode, as the same file can be loaded on the rebuild without having to be resolved, which the plugin now handles.
-
#409
a9c5cb7
Thanks @benjervis! - Update the "vanilla-extract" devStyleRuntime option.When using the vanilla browser runtime in vite, it now operates on a new model where a .css.js file is generated, that uses @vanilla-extract/css/injectStyles to add the css to the browser.
This allows for hot reloading of styles, and makes styles a bit easier to debug at dev time (because they're actually visible).
-
#409
a9c5cb7
Thanks @benjervis! - Handle vite 2.6.As of vite 2.6 and greater,
?used
gets appended to css imports, which causes the file imports to be not what we expected.This caused mismatching classnames in the vite plugin, and it caused the babel plugin to not add filescopes when it should have.
-
#409
a9c5cb7
Thanks @benjervis! - Automatically optimize deps.When using the new vanilla browser runtime, the new
injectStyles
dependency gets injected at runtime, so vite can't discover it ahead of time and pre-bundle it.The plugin will now add the dependency to optimizeDeps if the vanilla runtime is being used so that it's optimized up front. It also ensures that some relevant vanilla packages are externalised in SSR mode.
-
Updated dependencies [
a9c5cb7
]:- @vanilla-extract/integration@1.4.3
-
#398
63f4ed0
Thanks @benjervis! - Fixes a bug with vite where "?used" is appended to the file path of css files.This could cause different class name hashes to be generated between SSR and client builds. This was introduced in vite 2.6.0.
-
#393
2f379f1
Thanks @mattcompiles! - Fix compilation errors in Vite 2.6 -
Updated dependencies [
2f379f1
]:- @vanilla-extract/integration@1.4.2
-
#373
a55d2cf
Thanks @mattcompiles! - AdddevStyleRuntime
option to allow switching between dev style runtimesThe built-in Vite dev style runtime (what adds styles to the page when running
vite serve
) doesn't seem to clean up old styles as expected. PassingdevStyleRuntime: 'vanilla-extract'
will instead use vanilla-extract's browser runtime. This pushes all style creation in development to the browser, but may give a better HMR experience.
-
#341
0b743e7
Thanks @mattcompiles! - Refactor SSR file scoping to use centralisedaddFileScope
implementation -
Updated dependencies [
50bae14
,0b743e7
]:- @vanilla-extract/integration@1.3.0
- #327
73b55f8
Thanks @benjervis! - Fix bug where precompiled .css.ts files (.css.js) were treated differently in SSR mode.
-
#323
1e7d647
Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via theidentifiers
option which accepts eithershort
ordebug
.short
identifiers are a 7+ character hash. e.g.hnw5tz3
debug
identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g.somefile_mystyle_hnw5tz3
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; vanillaExtractPlugin({ identifiers: 'short' });
BREAKING CHANGE
Previously identifiers were formatted as
short
whenprocess.env.NODE_ENV
was set to "production". By default, they will now be formatted according to Vite's mode config.
- Updated dependencies [
1e7d647
]:- @vanilla-extract/integration@1.2.0
-
#311
416eb9a
Thanks @mattcompiles! - In SSR mode, move to runtime evaluation of vanilla-extract filesThis unlocks the potential for CSS extraction on the server.
- #270
fe19158
Thanks @yyx990803! - Fix watching of modules imported by.css.ts
files
-
#259
b8a6441
Thanks @markdalgleish! - Allow the result ofcomposeStyles
to be used in selectorsWhen style compositions are used in selectors, they are now assigned an additional class so they can be uniquely identified. When selectors are processed internally, the composed classes are removed, only leaving behind the unique identifier classes. This allows you to treat them as if they were a single class within vanilla-extract selectors.
import { style, globalStyle, composeStyles } from '@vanilla-extract/css'; const background = style({ background: 'mintcream' }); const padding = style({ padding: 12 }); export const container = composeStyles( background, padding ); globalStyle(`${container} *`, { boxSizing: 'border-box' });
- Updated dependencies [
b8a6441
]:- @vanilla-extract/integration@1.1.0
- #171
84a8611
Thanks @mattcompiles! - Release v1
- Updated dependencies [
84a8611
]:- @vanilla-extract/integration@1.0.0
-
#96
697a233
Thanks @mattcompiles! - Change vite-plugin to be a named exportBREAKING CHANGE
-import vanillaExtractPlugin from '@vanilla-extract/vite-plugin'; +import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; // vite.config.js export default { plugins: [vanillaExtractPlugin()] }