build: move named char references to json file to speed up build

This commit is contained in:
Evan You
2019-09-19 23:19:48 -04:00
parent 9b1a548c6b
commit 3b5ef483a9
6 changed files with 2255 additions and 2233 deletions

View File

@@ -3,6 +3,7 @@ const path = require('path')
const ts = require('rollup-plugin-typescript2')
const replace = require('rollup-plugin-replace')
const alias = require('rollup-plugin-alias')
const json = require('rollup-plugin-json')
if (!process.env.TARGET) {
throw new Error('TARGET package must be specified via --environment flag.')
@@ -110,6 +111,9 @@ function createConfig(output, plugins = []) {
// used alone.
external: isGlobalBuild || isBrowserESMBuild ? [] : externals,
plugins: [
json({
namedExports: false
}),
tsPlugin,
aliasPlugin,
createReplacePlugin(