Remove unnecessary moduleName option from rollup config for plugins (#209)
This commit is contained in:
parent
cee8ac6698
commit
e54062f80d
1 changed files with 7 additions and 10 deletions
|
|
@ -28,7 +28,6 @@ var build = function (opts) {
|
||||||
console.log(dest)
|
console.log(dest)
|
||||||
bundle.write({
|
bundle.write({
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
moduleName: opts.moduleName || 'D',
|
|
||||||
dest: dest
|
dest: dest
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -43,19 +42,18 @@ build({
|
||||||
})
|
})
|
||||||
|
|
||||||
var plugins = [
|
var plugins = [
|
||||||
{ name: 'search', entry: 'search/index.js', moduleName: 'Search' },
|
{ name: 'search', entry: 'search/index.js' },
|
||||||
{ name: 'ga', entry: 'ga.js', moduleName: 'GA' },
|
{ name: 'ga', entry: 'ga.js' },
|
||||||
{ name: 'emoji', entry: 'emoji.js', moduleName: 'Emoji' },
|
{ name: 'emoji', entry: 'emoji.js' },
|
||||||
{ name: 'external-script', entry: 'external-script.js', moduleName: 'ExternalScript' },
|
{ name: 'external-script', entry: 'external-script.js' },
|
||||||
{ name: 'front-matter', entry: 'front-matter/index.js', moduleName: 'FrontMatter' },
|
{ name: 'front-matter', entry: 'front-matter/index.js' },
|
||||||
{ name: 'zoom-image', entry: 'zoom-image.js', moduleName: 'ZoomImage' }
|
{ name: 'zoom-image', entry: 'zoom-image.js' }
|
||||||
]
|
]
|
||||||
|
|
||||||
plugins.forEach(item => {
|
plugins.forEach(item => {
|
||||||
build({
|
build({
|
||||||
entry: 'plugins/' + item.entry,
|
entry: 'plugins/' + item.entry,
|
||||||
output: 'plugins/' + item.name + '.js',
|
output: 'plugins/' + item.name + '.js'
|
||||||
moduleName: 'D.' + item.moduleName
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -69,7 +67,6 @@ if (isProd) {
|
||||||
build({
|
build({
|
||||||
entry: 'plugins/' + item.entry,
|
entry: 'plugins/' + item.entry,
|
||||||
output: 'plugins/' + item.name + '.min.js',
|
output: 'plugins/' + item.name + '.min.js',
|
||||||
moduleName: 'D.' + item.moduleName,
|
|
||||||
plugins: [uglify()]
|
plugins: [uglify()]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue