1 Star 0 Fork 17

shuzhuo/vue2-to-composition-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 820 Bytes
一键复制 编辑 原始数据 按行查看 历史
wudi 提交于 2023-04-08 20:08 +08:00 . feat: build / typeof
const path = require('path')
const webpack = require('webpack')
module.exports = {
devtool: 'source-map',
entry: './src/main.ts',
output: {
path: path.resolve(__dirname, './lib'),
publicPath: '/lib/',
filename: 'index.js',
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
rules: [{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader', /* https://github.com/TypeStrong/ts-loader */
options: {
configFile: path.resolve(__dirname, './tsconfig.json'),
appendTsSuffixTo: [/\.vue$/],
transpileOnly: true,
}
}]
}]
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
})
],
target: ['web', 'es5']
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenshuzhuo/vue2-to-composition-api.git
git@gitee.com:chenshuzhuo/vue2-to-composition-api.git
chenshuzhuo
vue2-to-composition-api
vue2-to-composition-api
master

搜索帮助