mermaidAPI should target node

This commit is contained in:
Tyler Long
2017-04-16 21:38:48 +08:00
parent 8536c975bf
commit e16e501b93
10 changed files with 63 additions and 72 deletions

View File

@@ -1,16 +1,11 @@
import path from 'path'
import { webConfig, nodeConfig } from './webpack.config.base.js'
const config = {
target: 'web',
entry: {
mermaid: './src/mermaid.js',
mermaidAPI: './src/mermaidAPI.js'
},
externals: 'fs',
output: {
path: path.join(__dirname, './dist/'),
filename: '[name].js'
}
}
const config1 = webConfig()
export default [config]
const config2 = webConfig()
config2.externals = ['fs', 'd3']
config2.output.filename = '[name].slim.js'
const config3 = nodeConfig()
export default [config1, config2, config3]