To help developers customize the way it generates component id for particular cases.
Additional context
Added this option into features field:
/**
* Customize the component ID generation strategy.
* - `'filepath'`: hash the file path (relative to the project root)
* - `'filepath-source'`: hash the file path and the source code
* - `function`: custom function that takes the file path, source code,
* whether in production mode, and the default hash function as arguments
* - **default:** `'filepath'` in development, `'filepath-source'` in production
*/
componentIdGenerator?:
| 'filepath'
| 'filepath-source'
| ((
filepath: string,
source: string,
isProduction: boolean | undefined,
getHash: (text: string) => string,
) => string)
What is the purpose of this pull request?
[ ] Bug fix
[x] New Feature
[ ] Documentation update
[ ] Other
Before submitting the PR, please make sure you do the following
Description
To help developers customize the way it generates component id for particular cases.
Additional context
Added this option into
features
field:What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).