vue3关闭 选项式api
2022-09-18 本文已影响0人
苍老师的眼泪
webpack:
vue.config.js
const webpack = require('webpack');
module.exports = {
plugins: [
// Define Bundler Build Feature Flags
new webpack.DefinePlugin({
// Drop Options API from bundle
__VUE_OPTIONS_API__: false,
}),
],
};
https://stackoverflow.com/a/64256097
vite:
vite.config.js
define: {
__VUE_OPTIONS_API__: false
}
https://blog.csdn.net/m0_51431448/article/details/124589293
https://github.com/vuejs/core/tree/main/packages/vue