]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
Merge remote-tracking branch 'upstream/minor'
author三咲智子 Kevin Deng <sxzz@sxzz.moe>
Fri, 1 Dec 2023 00:16:50 +0000 (08:16 +0800)
committer三咲智子 Kevin Deng <sxzz@sxzz.moe>
Fri, 1 Dec 2023 00:16:50 +0000 (08:16 +0800)
1  2 
packages/compiler-sfc/package.json
pnpm-lock.yaml
rollup.config.js
tsconfig.build.json
tsconfig.json

Simple merge
diff --cc pnpm-lock.yaml
Simple merge
index 59e6924daf0e385f28138777973487438920460b,b7d38e4527ab057d9d3fae5abe77654075146aa2..eb1902234f4673d7e72db0ce931ce87370b055bc
@@@ -150,43 -148,9 +148,43 @@@ function createConfig(format, output, p
    // Rollup to complain for non-ESM targets, so we use separate entries for
    // esm vs. non-esm builds.
    if (isCompatPackage && (isBrowserESMBuild || isBundlerESMBuild)) {
 -    entryFile = /runtime$/.test(format)
 -      ? `src/esm-runtime.ts`
 -      : `src/esm-index.ts`
 +    entryFile = `esm-${entryFile}`
 +  }
 +  entryFile = 'src/' + entryFile
 +
 +  return {
 +    input: resolve(entryFile),
 +    // Global and Browser ESM builds inlines everything so that they can be
 +    // used alone.
 +    external: resolveExternal(),
 +    plugins: [
 +      json({
 +        namedExports: false
 +      }),
 +      alias({
 +        entries
 +      }),
 +      enumPlugin,
 +      ...resolveReplace(),
 +      esbuild({
 +        tsconfig: path.resolve(__dirname, 'tsconfig.json'),
 +        sourceMap: output.sourcemap,
 +        minify: false,
 +        target: isServerRenderer || isNodeBuild ? 'es2019' : 'es2015',
 +        define: resolveDefine()
 +      }),
 +      ...resolveNodePlugins(),
 +      ...plugins
 +    ],
 +    output,
 +    onwarn(msg, warn) {
-       if (!/Circular/.test(msg.message)) {
++      if (msg.code !== 'CIRCULAR_DEPENDENCY') {
 +        warn(msg)
 +      }
 +    },
 +    treeshake: {
 +      moduleSideEffects: false
 +    }
    }
  
    function resolveDefine() {
  
      return nodePlugins
    }
 -
 -  return {
 -    input: resolve(entryFile),
 -    // Global and Browser ESM builds inlines everything so that they can be
 -    // used alone.
 -    external: resolveExternal(),
 -    plugins: [
 -      json({
 -        namedExports: false
 -      }),
 -      alias({
 -        entries
 -      }),
 -      enumPlugin,
 -      ...resolveReplace(),
 -      esbuild({
 -        tsconfig: path.resolve(__dirname, 'tsconfig.json'),
 -        sourceMap: output.sourcemap,
 -        minify: false,
 -        target: isServerRenderer || isNodeBuild ? 'es2019' : 'es2015',
 -        define: resolveDefine()
 -      }),
 -      ...resolveNodePlugins(),
 -      ...plugins
 -    ],
 -    output,
 -    onwarn: (msg, warn) => {
 -      if (msg.code !== 'CIRCULAR_DEPENDENCY') {
 -        warn(msg)
 -      }
 -    },
 -    treeshake: {
 -      moduleSideEffects: false
 -    }
 -  }
  }
  
- /**
-  * @param {Format} format
-  */
- function createProductionConfig(format) {
+ function createProductionConfig(/** @type {PackageFormat} */ format) {
    return createConfig(format, {
 -    file: resolve(`dist/${name}.${format}.prod.js`),
 -    format: outputConfigs[format].format
 +    ...outputConfigs[format],
 +    file: resolve(`dist/${name}.${format}.prod.js`)
    })
  }
  
index 43161f91fd38000dfb493f21039ee307a156199f,954103c0f2f66d05033a949956d1bb0e4006df68..c3be791568814d1553436033dedd17dd74190a6c
@@@ -10,9 -10,6 +10,7 @@@
      "packages/runtime-test",
      "packages/template-explorer",
      "packages/sfc-playground",
 -    "packages/dts-test"
 +    "packages/dts-test",
-     "rollup.config.js",
-     "scripts/*",
 +    "playground"
    ]
  }
diff --cc tsconfig.json
index 931831bda6467864ae48b67a0e0f5c9de019a834,f47b7fc8eb9b00d692065b7358ef4f9d204150c0..ced7bbc1eaaf85e4104c483ec10e86cd42ea7688
@@@ -35,8 -34,7 +35,8 @@@
      "packages/*/__tests__",
      "packages/dts-test",
      "packages/vue/jsx-runtime",
 -    "rollup.*.js"
+     "scripts/*",
-   ],
-   "exclude": ["rollup.config.js"]
 +    "rollup.*.js",
 +    "playground"
+   ]
  }