mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-01 14:46:41 +02:00
Disable amd parse for lodash
This commit is contained in:
2
dist/demo/index.html
vendored
2
dist/demo/index.html
vendored
@@ -100,7 +100,7 @@ Class08 <--> C2: Cool label
|
|||||||
</div>
|
</div>
|
||||||
<script src="../mermaid.js"></script>
|
<script src="../mermaid.js"></script>
|
||||||
<script>
|
<script>
|
||||||
mermaid.initialize({startOnLoad:true});
|
mermaid.initialize({startOnLoad: true});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mermaid",
|
"name": "mermaid",
|
||||||
"version": "7.0.2",
|
"version": "7.0.3",
|
||||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"main": "src/mermaid.js",
|
"main": "src/mermaid.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@@ -2,6 +2,15 @@ import path from 'path'
|
|||||||
import nodeExternals from 'webpack-node-externals'
|
import nodeExternals from 'webpack-node-externals'
|
||||||
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
||||||
|
|
||||||
|
const rules = [
|
||||||
|
{
|
||||||
|
parser: {
|
||||||
|
amd: false
|
||||||
|
},
|
||||||
|
include: /node_modules\/lodash\//
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
export const webConfig = () => {
|
export const webConfig = () => {
|
||||||
return {
|
return {
|
||||||
target: 'web',
|
target: 'web',
|
||||||
@@ -14,7 +23,7 @@ export const webConfig = () => {
|
|||||||
filename: '[name].js'
|
filename: '[name].js'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: rules.concat([
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
use: {
|
use: {
|
||||||
@@ -33,7 +42,7 @@ export const webConfig = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,7 +60,7 @@ export const nodeConfig = () => {
|
|||||||
libraryTarget: 'commonjs2'
|
libraryTarget: 'commonjs2'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: rules.concat([
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
use: {
|
use: {
|
||||||
@@ -67,7 +76,7 @@ export const nodeConfig = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,7 +95,7 @@ export const lessConfig = () => {
|
|||||||
filename: '[name].css'
|
filename: '[name].css'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: rules.concat([
|
||||||
{
|
{
|
||||||
test: /\.less$/,
|
test: /\.less$/,
|
||||||
use: ExtractTextPlugin.extract({
|
use: ExtractTextPlugin.extract({
|
||||||
@@ -101,7 +110,7 @@ export const lessConfig = () => {
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new ExtractTextPlugin('[name].css')
|
new ExtractTextPlugin('[name].css')
|
||||||
|
Reference in New Issue
Block a user