This is the changelog for assets. It follows semantic versioning.
-
Fixed asset route resolution for URL pathnames that contain percent-encoded file path characters, including scoped package names such as
%40remix-run. -
Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
-
Use canonical realpath asset URLs for package imports so symlinked package paths and their real paths do not produce duplicate browser modules.
-
Use polling for asset server file watching by default on Windows to avoid native filesystem watcher crashes while still allowing explicit
watch.polloverrides. -
Bumped
@remix-run/*dependencies:
-
Resolve bare imports from symlinked packages using the package's real filesystem path so pnpm virtual-store dependencies can be served through the asset server (see #11438).
-
Bumped
@remix-run/*dependencies:
-
Add support for serving configured leaf file assets via a new
filesoption increateAssetServer().Relative CSS
url()references are now resolved through the asset server, rewriting supported file assets to asset server URLs and surfacing errors for missing or unsupported files.
-
Preserve
node_modulespackage symlink identity paths when rewriting script imports, while still reading, caching, and invalidating modules through their canonical real paths. -
Bumped
@remix-run/*dependencies:
-
BREAKING CHANGE:
createAssetServer()now requires abasePathoption, andfileMapURL patterns are now relative to that base path.// Before: createAssetServer({ fileMap: { '/assets/app/*path': 'app/*path', '/assets/npm/*path': 'node_modules/*path', }, allow: ['app/**', 'node_modules/**'], }) // After: createAssetServer({ basePath: '/assets', fileMap: { '/app/*path': 'app/*path', '/npm/*path': 'node_modules/*path', }, allow: ['app/**', 'node_modules/**'], })
- The
@oxc-project/runtimepackage which provides helpers for generated code targeting older browsers is now served automatically by the asset server and doesn't need to be manually installed.
-
BREAKING CHANGE:
targetconfiguration is now configured at the top level with an object format, supportingesversion targets along with browser version targets.Browser targets are configured with string versions such as
target: { chrome: '109', safari: '16.4' }, and scripts can specifyesas a year of2015or higher such astarget: { es: '2020' }.To migrate existing script configuration, replace
scripts.targetoptions likescripts: { target: 'es2020' }withtarget: { es: '2020' }. -
BREAKING CHANGE: Shared compiler options are now provided at the top level of
createAssetServer(). UsesourceMaps,sourceMapSourcePaths, andminifydirectly on the asset server options instead of being nested underscripts. This allows these options to also be used for styles as well as scripts.To migrate existing configuration, move
scripts.minify,scripts.sourceMaps,scripts.sourceMapSourcePathsto the top-level asset server options. -
createAssetServer()now compiles and serves.cssfiles alongside scripts, including local@importrewriting, fingerprinting, and shared compiler options for minification, source maps, and browser compatibility targeting.
-
Fix matching of dot-prefixed files and directories in
allowanddenyglobs -
Improve asset server import errors to include the resolved file path when a resolved import is later rejected by validation for allow/deny rules, supported file types and
fileMapconfiguration.
- Initial release of
@remix-run/assets.
- Bumped
@remix-run/*dependencies: