mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-12-02 20:20:30 +08:00
8352a1e489
* refactor: build config * chore: fix conflict * fix: 404 page path
35 lines
762 B
JavaScript
35 lines
762 B
JavaScript
var rollup = require('rollup')
|
|
var buble = require('rollup-plugin-buble')
|
|
var async = require('rollup-plugin-async')
|
|
var replace = require('rollup-plugin-replace')
|
|
|
|
rollup
|
|
.rollup({
|
|
input: 'packages/docsify-server-renderer/index.js',
|
|
plugins: [
|
|
async(),
|
|
replace({
|
|
__VERSION__: process.env.VERSION || require('../package.json').version,
|
|
'process.env.SSR': true
|
|
}),
|
|
buble({
|
|
transforms: {
|
|
generator: false
|
|
}
|
|
})
|
|
],
|
|
onwarn: function () {}
|
|
})
|
|
.then(function (bundle) {
|
|
var dest = 'packages/docsify-server-renderer/build.js'
|
|
|
|
console.log(dest)
|
|
bundle.write({
|
|
format: 'cjs',
|
|
file: dest
|
|
})
|
|
})
|
|
.catch(function (err) {
|
|
console.error(err)
|
|
})
|