Added the option to only bundle js in yarn deploy
This commit is contained in:
parent
f4f33dcd8d
commit
54480555a1
3 changed files with 12 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as path from 'path'
|
||||
import {build} from 'esbuild'
|
||||
import type {Plugin} from 'esbuild'
|
||||
import {mkdirSync, writeFileSync} from 'fs'
|
||||
import {existsSync, mkdirSync, writeFileSync} from 'fs'
|
||||
|
||||
const externalPlugin = (patterns: RegExp[]): Plugin => {
|
||||
return {
|
||||
|
@ -55,7 +55,8 @@ function createBundles(watch: boolean) {
|
|||
format: 'cjs',
|
||||
})
|
||||
|
||||
mkdirSync(path.join(pathToPackage, 'dist'))
|
||||
if (!existsSync(path.join(pathToPackage, 'dist')))
|
||||
mkdirSync(path.join(pathToPackage, 'dist'))
|
||||
|
||||
writeFileSync(
|
||||
path.join(pathToPackage, 'dist/index.js'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue