Skip to content

wmr 2.1.0

Compare
Choose a tag to compare
@marvinhagemeister marvinhagemeister released this 13 May 19:15
· 627 commits to main since this release
1b5852f

Minor Changes

  • 10df8bb #619 Thanks @marvinhagemeister! - Deprecate "aliases" configuration in favor of "alias" to have a consistent name across various frontend tools. The "aliases" property will continue to work, but a deprecation warning will be printed to the console.

    export default {
    -	aliases: {
    +	alias: {
    		react: 'preact/compat'
    	}
    };
  • d907131 #552 Thanks @marvinhagemeister! - Add support for importing files outside of the main public directory. This feature is based on aliases and <project>/src is added by default. To prevent unexpected file access only the directories defined in the aliases and the public directory are allowed to read files from. To alias a new path add the following to your WMR configuration file:

    // File: wmr.config.mjs
    import { defineConfig } from 'wmr';
    
    export default defineConfig({
    	alias: {
    		// This will alias "~" to "<project>/src/components/"
    		'~/*': './src/components/'
    	}
    });

Patch Changes