|
@@ -1,4 +1,3 @@
|
|
|
-import fs from 'fs'
|
|
|
|
|
import path from 'path'
|
|
import path from 'path'
|
|
|
import ts from 'rollup-plugin-typescript2'
|
|
import ts from 'rollup-plugin-typescript2'
|
|
|
import replace from '@rollup/plugin-replace'
|
|
import replace from '@rollup/plugin-replace'
|
|
@@ -16,10 +15,6 @@ const resolve = p => path.resolve(packageDir, p)
|
|
|
const pkg = require(resolve(`package.json`))
|
|
const pkg = require(resolve(`package.json`))
|
|
|
const packageOptions = pkg.buildOptions || {}
|
|
const packageOptions = pkg.buildOptions || {}
|
|
|
|
|
|
|
|
-const knownExternals = fs.readdirSync(packagesDir).filter(p => {
|
|
|
|
|
- return p !== '@vue/shared'
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
// ensure TS checks only once for each build
|
|
// ensure TS checks only once for each build
|
|
|
let hasTSChecked = false
|
|
let hasTSChecked = false
|
|
|
|
|
|
|
@@ -112,9 +107,7 @@ function createConfig(format, output, plugins = []) {
|
|
|
format === 'esm-bundler-runtime' ? `src/runtime.ts` : `src/index.ts`
|
|
format === 'esm-bundler-runtime' ? `src/runtime.ts` : `src/index.ts`
|
|
|
|
|
|
|
|
const external =
|
|
const external =
|
|
|
- isGlobalBuild || isRawESMBuild
|
|
|
|
|
- ? []
|
|
|
|
|
- : knownExternals.concat(Object.keys(pkg.dependencies || []))
|
|
|
|
|
|
|
+ isGlobalBuild || isRawESMBuild ? [] : Object.keys(pkg.dependencies || {})
|
|
|
|
|
|
|
|
const nodePlugins = packageOptions.enableNonBrowserBranches
|
|
const nodePlugins = packageOptions.enableNonBrowserBranches
|
|
|
? [
|
|
? [
|