Skip to content

Commit

Permalink
feat: Tencent#696 构建产物里额外提供预览区样式的文件 (Tencent#783)
Browse files Browse the repository at this point in the history
* chore(release): 0.8.42

* feat: Tencent#696 构建产物里额外提供预览区样式的文件

---------

Co-authored-by: sunsonliu(刘阳) <sunsonliu@tencent.com>
Co-authored-by: xiayuxuan <xiayx.leo@qq.com>
  • Loading branch information
3 people committed Jun 24, 2024
1 parent 4e05ac6 commit e33c0d6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions build/rollup.styles.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,33 @@ const options = [
},
],
},
{
input: 'src/sass/previewer.scss',
output: {
file: 'dist/cherry-previewer.styles.js',
},
plugins: [
scss({
fileName: IS_PRODUCTION ? 'cherry-markdown.previewer.min.css' : 'cherry-markdown.previewer.css',
// node进程是否在错误时终止
failOnError: true,
...(IS_PRODUCTION && {
outputStyle: 'compressed',
}),
sass: dartSass,
}),
{
generateBundle: (option, bundle) => {
// remove all non-asset files from bundle
Object.keys(bundle).forEach((key) => {
if (bundle[key].type !== 'asset') {
delete bundle[key];
}
});
},
},
],
},
// {
// input: 'src/sass/markdown.scss',
// output: {
Expand Down

0 comments on commit e33c0d6

Please sign in to comment.