build: make @vue/shared public
This avoids it being inlined multiple times in esm bundler builds
This commit is contained in:
7
packages/shared/api-extractor.json
Normal file
7
packages/shared/api-extractor.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../../api-extractor.json",
|
||||
"mainEntryPointFilePath": "./dist/packages/<unscopedPackageName>/src/index.d.ts",
|
||||
"dtsRollup": {
|
||||
"untrimmedFilePath": "./dist/<unscopedPackageName>.d.ts"
|
||||
}
|
||||
}
|
||||
7
packages/shared/index.js
Normal file
7
packages/shared/index.js
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/shared.cjs.prod.js')
|
||||
} else {
|
||||
module.exports = require('./dist/shared.cjs.js')
|
||||
}
|
||||
@@ -1,5 +1,31 @@
|
||||
{
|
||||
"name": "@vue/shared",
|
||||
"version": "3.0.0-alpha.7",
|
||||
"private": true
|
||||
"description": "internal utils shared across @vue packages",
|
||||
"main": "index.js",
|
||||
"module": "dist/shared.esm-bundler.js",
|
||||
"types": "dist/shared.d.ts",
|
||||
"files": [
|
||||
"index.js",
|
||||
"dist"
|
||||
],
|
||||
"buildOptions": {
|
||||
"formats": [
|
||||
"esm-bundler",
|
||||
"cjs"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vuejs/vue-next.git"
|
||||
},
|
||||
"keywords": [
|
||||
"vue"
|
||||
],
|
||||
"author": "Evan You",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/vuejs/vue-next/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue-next/tree/master/packages/shared#readme"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user