Skip to content

Commit 16098a7

Browse files
devversionjosephperrott
authored andcommitted
build: exported scss files missing in CDK (#13679)
1 parent 34812fa commit 16098a7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tools/package-tools/gulp/build-tasks-gulp.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ export function createPackageBuildTasks(buildPackage: BuildPackage, preBuildTask
3030
// Name of all dependencies of the current package.
3131
const dependencyNames = buildPackage.dependencies.map(p => p.name);
3232

33-
// Glob that matches all style files that need to be copied to the package output.
34-
const stylesGlob = join(buildPackage.sourceDir, '**/*.css');
33+
// Glob that matches all style files that need to be copied to the package output. Besides CSS
34+
// files that will be copied (e.g. in the examples package), we copy the source SCSS files that
35+
// start with an underscore. These files can be packaged into the release output if the
36+
// build package `copySecondaryEntryPointStylesToRoot` option is enabled (e.g. _overlay.scss).
37+
const styleGlobs = [
38+
join(buildPackage.sourceDir, '**/*.css'),
39+
join(buildPackage.sourceDir, '**/_*.scss'),
40+
];
3541

3642
// Glob that matches every HTML file in the current package.
3743
const htmlGlob = join(buildPackage.sourceDir, '**/*.html');
@@ -119,7 +125,7 @@ export function createPackageBuildTasks(buildPackage: BuildPackage, preBuildTask
119125
);
120126

121127
task(`${taskName}:assets:copy-styles`, () => {
122-
return src(stylesGlob)
128+
return src(styleGlobs)
123129
.pipe(dest(buildPackage.outputDir))
124130
.pipe(dest(buildPackage.esm5OutputDir));
125131
});

0 commit comments

Comments
 (0)