"clean": "rimraf --glob packages/*/dist temp .eslintcache",
"size": "run-s \"size-*\" && node scripts/usage-size.js",
"size-global": "node scripts/build.js vue vue-vapor runtime-dom runtime-vapor compiler-dom -f global -p --size",
- "size-esm-runtime": "node scripts/build.js vue vue-vapor -f esm-bundler-runtime",
- "size-esm": "node scripts/build.js runtime-shared runtime-dom runtime-vapor runtime-core reactivity shared -f esm-bundler",
+ "size-esm-runtime": "node scripts/build.js vue -f esm-bundler-runtime",
+ "size-esm": "node scripts/build.js runtime-shared runtime-dom runtime-vapor runtime-core reactivity shared vue-vapor -f esm-bundler",
"check": "tsc --incremental --noEmit",
"lint": "eslint --cache .",
"format": "prettier --write --cache .",
"version": "3.0.0-vapor",
"description": "The progressive JavaScript framework for building modern web UI.",
"main": "index.js",
- "module": "dist/vue-vapor.runtime.esm-bundler.js",
+ "module": "dist/vue-vapor.esm-bundler.js",
"types": "dist/vue-vapor.d.ts",
"unpkg": "dist/vue-vapor.global.js",
"jsdelivr": "dist/vue-vapor.global.js",
"types": "./dist/vue-vapor.d.ts",
"import": {
"node": "./index.mjs",
- "default": "./dist/vue-vapor.runtime.esm-bundler.js"
+ "default": "./dist/vue-vapor.esm-bundler.js"
},
"require": {
"node": {
"name": "VueVapor",
"formats": [
"esm-bundler",
- "esm-bundler-runtime",
"cjs",
"global",
- "global-runtime",
- "esm-browser",
- "esm-browser-runtime"
+ "esm-browser"
]
},
"repository": {
},
"homepage": "https://github.com/vuejs/vue-vapor/tree/main/packages/vapor#readme",
"dependencies": {
- "@vue/runtime-vapor": "workspace:*",
- "@vue/compiler-vapor": "workspace:*"
+ "@vue/runtime-vapor": "workspace:*"
}
}
+++ /dev/null
-import { initCustomFormatter } from '@vue/runtime-dom'
-
-export function initDev(): void {
- if (__BROWSER__) {
- /* istanbul ignore if */
- if (!__ESM_BUNDLER__) {
- console.info(
- `You are running a development build of Vue.\n` +
- `Make sure to use the production build (*.prod.js) when deploying for production.`,
- )
- }
-
- initCustomFormatter()
- }
-}
-// This entry is the "full-build" that includes both the runtime
-// and the compiler, and supports on-the-fly compilation of the template option.
-import { initDev } from './dev'
+import { initCustomFormatter } from '@vue/runtime-dom'
-if (__DEV__) {
- initDev()
-}
+if (__DEV__ && __BROWSER__) {
+ /* istanbul ignore if */
+ if (!__ESM_BUNDLER__) {
+ console.info(
+ `You are running a development build of Vue.\n` +
+ `Make sure to use the production build (*.prod.js) when deploying for production.`,
+ )
+ }
-// TODO register compiler
+ initCustomFormatter()
+}
-export { compile } from '@vue/compiler-vapor'
export * from '@vue/runtime-vapor'
+++ /dev/null
-// This entry exports the runtime only, and is built as
-// `dist/vue.esm-bundler.js` which is used by default for bundlers.
-import { initDev } from './dev'
-// TODO implement warn
-// import { warn } from '@vue/runtime-vapor'
-
-if (__DEV__) {
- initDev()
-}
-
-export * from '@vue/runtime-vapor'
-
-export const compile = (): void => {
- if (__DEV__) {
- console.warn(
- `Runtime compilation is not supported in this build of Vue.` +
- (__ESM_BUNDLER__
- ? ` Configure your bundler to alias "vue" to "vue/dist/vue-vapor.esm-bundler.js".`
- : __ESM_BROWSER__
- ? ` Use "vue-vapor.esm-browser.js" instead.`
- : __GLOBAL__
- ? ` Use "vue-vapor.global.js" instead.`
- : ``) /* should not happen */,
- )
- }
-}
packages/vue-vapor:
dependencies:
- '@vue/compiler-vapor':
- specifier: workspace:*
- version: link:../compiler-vapor
'@vue/runtime-vapor':
specifier: workspace:*
version: link:../runtime-vapor
const sizeDir = path.resolve('temp/size')
const vue = path.resolve('./packages/vue/dist/vue.runtime.esm-bundler.js')
-const vapor = path.resolve(
- './packages/vue-vapor/dist/vue-vapor.runtime.esm-bundler.js',
-)
+const vapor = path.resolve('./packages/vue-vapor/dist/vue-vapor.esm-bundler.js')
/**
* @typedef {Object} Preset
from: vue,
},
{ name: 'createApp', imports: ['createApp'], from: vue },
+ { name: 'createVaporApp', imports: ['createVaporApp'], from: vapor },
{ name: 'createSSRApp', imports: ['createSSRApp'], from: vue },
{ name: 'defineCustomElement', imports: ['defineCustomElement'], from: vue },
- { name: 'vapor', imports: '*', from: vapor },
{
name: 'overall',
imports: [