mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 17:54:13 +01:00
mermaidAPI should target node
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user