trimPlugin() — vue Function Reference
Architecture documentation for the trimPlugin() function in trim.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 1b5c1ba8_1851_1f8d_73f6_525738014182["trimPlugin()"] 49e03676_84c9_6dfa_51b3_0ac2412686d2["trim.ts"] 1b5c1ba8_1851_1f8d_73f6_525738014182 -->|defined in| 49e03676_84c9_6dfa_51b3_0ac2412686d2 eb225a87_b3c1_d8e5_4365_2b3c8f37effc["doCompileStyle()"] eb225a87_b3c1_d8e5_4365_2b3c8f37effc -->|calls| 1b5c1ba8_1851_1f8d_73f6_525738014182 style 1b5c1ba8_1851_1f8d_73f6_525738014182 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/compiler-sfc/src/stylePlugins/trim.ts lines 3–15
const trimPlugin: PluginCreator<{}> = () => {
return {
postcssPlugin: 'vue-sfc-trim',
Once(root) {
root.walk(({ type, raws }) => {
if (type === 'rule' || type === 'atrule') {
if (raws.before) raws.before = '\n'
if ('after' in raws && raws.after) raws.after = '\n'
}
})
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does trimPlugin() do?
trimPlugin() is a function in the vue codebase, defined in packages/compiler-sfc/src/stylePlugins/trim.ts.
Where is trimPlugin() defined?
trimPlugin() is defined in packages/compiler-sfc/src/stylePlugins/trim.ts at line 3.
What calls trimPlugin()?
trimPlugin() is called by 1 function(s): doCompileStyle.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free