fix: ssr package dep, fixed #605

This commit is contained in:
qingwei.li 2018-10-31 21:11:06 +08:00
commit 2bc880d335
5 changed files with 6 additions and 126 deletions

View file

@ -8,14 +8,12 @@ const isProd = process.env.NODE_ENV === 'production'
const version = process.env.VERSION || require('../package.json').version
const chokidar = require('chokidar')
const path = require('path')
const json = require('rollup-plugin-json')
const build = function(opts) {
const build = function (opts) {
rollup
.rollup({
input: opts.input,
plugins: (opts.plugins || []).concat([
json(),
buble(),
commonjs(),
nodeResolve(),
@ -25,7 +23,7 @@ const build = function(opts) {
})
])
})
.then(function(bundle) {
.then(function (bundle) {
var dest = 'lib/' + (opts.output || opts.input)
console.log(dest)
@ -35,11 +33,11 @@ const build = function(opts) {
strict: false
})
})
.catch(function(err) {
.catch(function (err) {
console.error(err)
})
}
const buildCore = function() {
const buildCore = function () {
build({
input: 'src/core/index.js',
output: 'docsify.js'
@ -53,7 +51,7 @@ const buildCore = function() {
})
}
}
const buildAllPlugin = function() {
const buildAllPlugin = function () {
var plugins = [
{name: 'search', input: 'search/index.js'},
{name: 'ga', input: 'ga.js'},