diff --git a/packages/kbn-plugin-generator/sao_template/sao.js b/packages/kbn-plugin-generator/sao_template/sao.js index b72cb1487e03e..53d7089e43ffa 100755 --- a/packages/kbn-plugin-generator/sao_template/sao.js +++ b/packages/kbn-plugin-generator/sao_template/sao.js @@ -63,6 +63,7 @@ module.exports = function({ name, targetPath, isKibanaPlugin }) { }, }, filters: { + 'public/**/index.scss': 'generateScss', 'public/**/*': 'generateApp', 'server/**/*': 'generateApi', 'translations/**/*': 'generateTranslations', @@ -84,6 +85,7 @@ module.exports = function({ name, targetPath, isKibanaPlugin }) { upperCamelCaseName: name.charAt(0).toUpperCase() + camelCase(name).slice(1), hasUi: !!answers.generateApp, hasServer: !!answers.generateApi, + hasScss: !!answers.generateScss, relRoot: isKibanaPlugin ? '../../../..' : '../../..', }, answers diff --git a/packages/kbn-plugin-generator/sao_template/template/public/index.scss b/packages/kbn-plugin-generator/sao_template/template/public/index.scss new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/kbn-plugin-generator/sao_template/template/public/index.ts b/packages/kbn-plugin-generator/sao_template/template/public/index.ts index cdb5cc8d490e3..6b769e873335f 100644 --- a/packages/kbn-plugin-generator/sao_template/template/public/index.ts +++ b/packages/kbn-plugin-generator/sao_template/template/public/index.ts @@ -1,3 +1,7 @@ +<%_ if (hasScss) { -%> +import './index.scss'; +<%_ } -%> + import { <%= upperCamelCaseName %>PublicPlugin } from './plugin'; export function plugin() {