1 Star 0 Fork 3

xuwulei/wp2vite

forked from Gitee 极速下载/wp2vite 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
dravenwu 提交于 2021-07-27 16:52 . update 2.0.1
import * as path from "path";
import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs';
import { babel } from '@rollup/plugin-babel';
import json from '@rollup/plugin-json';
import { terser } from "rollup-plugin-terser";
const config = {
treeshake: {
moduleSideEffects: 'no-external',
propertyReadSideEffects: false,
tryCatchDeoptimization: false
},
input: {
index: path.resolve(__dirname, 'src/main/start.js'),
cli: path.resolve(__dirname, 'src/main/cli.js')
},
external: [
...Object.keys(require('./package.json').dependencies)
],
output: {
dir: path.resolve(__dirname, 'dist/'),
entryFileNames: `[name].js`,
chunkFileNames: 'chunks/dep-[hash].js',
exports: 'named',
format: 'cjs',
externalLiveBindings: false,
freeze: false,
},
plugins: [
nodeResolve({
preferBuiltins: true
}),
babel({
babelHelpers: 'bundled',
exclude: "node_modules/**"
}),
commonjs({
extensions: ['.js'],
ignoreDynamicRequires: true,
}),
json(),
terser(),
],
}
export default config
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xuwulei/wp2vite.git
git@gitee.com:xuwulei/wp2vite.git
xuwulei
wp2vite
wp2vite
master

搜索帮助