Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Commit

Permalink
Fix split build
Browse files Browse the repository at this point in the history
  • Loading branch information
dhershman1 committed Aug 17, 2018
1 parent e571755 commit c0471f6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions rollup.split.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ const buildEntry = () => {
const paths = globby.sync(['src/*.js', '!src/index.js', '!src/_internals'])

paths.forEach(p => {
const { name, dir } = path.parse(p)
let [, moduleName] = dir.split('/')

if (name !== 'index') {
moduleName = name
}
const { name } = path.parse(p)

const config = {
input: path.resolve(__dirname, p),
Expand All @@ -24,10 +19,10 @@ const buildEntry = () => {
filesize()
],
output: {
dir,
file: `${moduleName}.js`,
dir: './',
file: `${name}.js`,
format: 'umd',
name: moduleName
name: name
}
}

Expand Down

0 comments on commit c0471f6

Please sign in to comment.