Do not build esm while watching
ESM modules are only important for tree shaking - when building the final production bundle
This commit is contained in:
parent
34173f4cf6
commit
77b09fa653
@ -176,7 +176,7 @@ async function buildJs(path: string) {
|
|||||||
|
|
||||||
async function watchJs(path: string, hot = false, ...extraArgs: string[]) {
|
async function watchJs(path: string, hot = false, ...extraArgs: string[]) {
|
||||||
const args = [
|
const args = [
|
||||||
join(path, 'esm', 'entrypoint.js'),
|
join(path, 'lib', 'entrypoint.js'),
|
||||||
]
|
]
|
||||||
if (hot) {
|
if (hot) {
|
||||||
const hotArgs = [
|
const hotArgs = [
|
||||||
@ -252,9 +252,9 @@ export async function frontend(...argv: string[]) {
|
|||||||
if (args['full-paths']) {
|
if (args['full-paths']) {
|
||||||
watchArgs.push('--full-paths')
|
watchArgs.push('--full-paths')
|
||||||
}
|
}
|
||||||
await build(argv[0], ...['--esm', path])
|
await build(argv[0], ...[path])
|
||||||
const promises = [
|
const promises = [
|
||||||
build(argv[0], ...['--esm', path, '--watch']),
|
build(argv[0], ...[path, '--watch']),
|
||||||
watchJs(path, args.hot, ...watchArgs),
|
watchJs(path, args.hot, ...watchArgs),
|
||||||
watchCss(path),
|
watchCss(path),
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user