1 Star 0 Fork 0

badboyoo/mini-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 898 Bytes
一键复制 编辑 原始数据 按行查看 历史
崔效瑞 提交于 2021-03-11 16:31 . feat: add env for language
import pkg from "./package.json";
import typescript from "rollup-plugin-typescript";
import sourceMaps from "rollup-plugin-sourcemaps";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import replace from "@rollup/plugin-replace";
export default {
input: "./src/index.ts",
plugins: [
replace({
"process.env.NODE_ENV": JSON.stringify("development"),
"process.env.VUE_ENV": JSON.stringify("browser"),
"process.env.LANGUAGE": JSON.stringify(process.env.LANGUAGE),
}),
resolve(),
commonjs(),
typescript({
exclude: "node_modules/**",
typescript: require("typescript"),
}),
sourceMaps(),
],
output: [
{
format: "cjs",
file: pkg.main,
sourcemap: true,
},
{
name: "vue",
format: "es",
file: pkg.module,
sourcemap: true,
},
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/badboyoo/mini-vue.git
[email protected]:badboyoo/mini-vue.git
badboyoo
mini-vue
mini-vue
master

搜索帮助