当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
9 Star 32 Fork 4

BarZu / pr1
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
pr1.config.js 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
// const jtaroModule = require('rollup-plugin-jtaro-module')
// const vue = require('rollup-plugin-vue') // 不支持
// const pug = require('rollup-plugin-pug-html')
// const less = require('rollup-plugin-less') // 落选
// const scss = require('rollup-plugin-scss')
const nodeResolve = require('rollup-plugin-node-resolve')
const rollupPaths = require('rollup-plugin-paths')
// const pr1Plugin = require('./src/rollup-plugin-pr1.js')
module.exports = {
vendor: [ // [0]是开发环境用的,[1]是生产环境用的,如果没有[1]生产环境也用[0]
['vue', 'vue/dist/vue.runtime.min.js'],
['jroll/src/jroll.js', 'jroll/build/jroll.min.js']
],
html2VueRender: true,
// 热更新
hot: true,
// static: ['./images'],
rollupConfig: { // 打包时用到的 Rollup 配置,input 和 output 的 file 选项是无效的
globals: {
'vue': 'Vue',
'jroll/src/jroll.js': 'JRoll'
},
plugins: [
// jtaroModule(),
// scss({
// output: false
// }),
// less(),
// pug()
nodeResolve(),
// 用于缩写 vue 等资源
rollupPaths({
'vue': '../node_modules/vue/dist/vue.esm.browser.js'
})
// pr1Plugin()
] // 配置 Rollup 的插件,飘刃也会用到
},
babelConfig: {
presets: [
[
'@babel/env', {
modules: false,
targets: {
ie: '9',
chrome: '49'
}
}
]
]
},
uglifyConfig: {
toplevel: true
},
beforeBuild: async function (originDir) {
console.log(`开始打包:${originDir}`)
},
afterBuild: async function (distDir) {
console.log(`打包完成:${distDir}`)
}
}
JavaScript
1
https://gitee.com/chenjianlong/pr1.git
git@gitee.com:chenjianlong/pr1.git
chenjianlong
pr1
pr1
master

搜索帮助