Closed auvansangit closed 6 years ago
As developer of Vue with Typescipt, I need to add new "styles' option in ComponentOptions.
This feature will allow developer to import styles as same as import template, for example:
import { Component, Vue } from 'vue-property-decorator'; @Component({ template: require('./home.html'), style: require('./home.scss') })
If possible we can import multiple styles: styles: require['./home.scss', 'home1.scss']
options.d.ts
export interface ComponentOptions< .... el?: Element | string; template?: string; style?: string; ....
For the case import multiple styles we need to modify @type/webpack-env/index.d.ts by adding new require function:
(paths: string[]): any; <T>(paths: string[]): T;
Users can do interface augmenting already.
Please read our official TypeScript doc. https://vuejs.org/v2/guide/typescript.html#Augmenting-Types-for-Use-with-Plugins
What problem does this feature solve?
As developer of Vue with Typescipt, I need to add new "styles' option in ComponentOptions.
This feature will allow developer to import styles as same as import template, for example:
If possible we can import multiple styles: styles: require['./home.scss', 'home1.scss']
What does the proposed API look like?
options.d.ts
For the case import multiple styles we need to modify @type/webpack-env/index.d.ts by adding new require function: