Skip to content

Commit 64b920b

Browse files
committed
chore: fix build if no dist folder
1 parent 6f359ab commit 64b920b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

build/rollup.config.base.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import replace from '@rollup/plugin-replace'
66
import { eslint } from 'rollup-plugin-eslint'
77
import css from 'rollup-plugin-css-only'
88
import autoprefixer from 'autoprefixer'
9-
import fs from 'fs'
9+
import fs from 'fs-extra'
1010
import CleanCSS from 'clean-css'
1111

1212
const config = require('../package.json')
@@ -28,6 +28,7 @@ export default {
2828
}),
2929
css({
3030
output: styles => {
31+
fs.ensureDirSync('dist')
3132
const file = require.resolve('vue-resize/dist/vue-resize.css')
3233
styles += fs.readFileSync(file, { encoding: 'utf8' })
3334
fs.writeFileSync('dist/vue-virtual-scroller.css', new CleanCSS().minify(styles).styles)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"eslint-plugin-promise": "^4.0.1",
5959
"eslint-plugin-standard": "^4.0.0",
6060
"eslint-plugin-vue": "^6.2.2",
61+
"fs-extra": "^10.1.0",
6162
"rollup": "^2.2.0",
6263
"rollup-plugin-babel": "^4.4.0",
6364
"rollup-plugin-css-only": "^2.0.0",

yarn.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,15 @@ flatted@^2.0.0:
19861986
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
19871987
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
19881988

1989+
fs-extra@^10.1.0:
1990+
version "10.1.0"
1991+
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"
1992+
integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==
1993+
dependencies:
1994+
graceful-fs "^4.2.0"
1995+
jsonfile "^6.0.1"
1996+
universalify "^2.0.0"
1997+
19891998
fs-extra@^7.0.1:
19901999
version "7.0.1"
19912000
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"

0 commit comments

Comments
 (0)