Skip to content

Commit

Permalink
Disable amd parse for lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Jun 4, 2017
1 parent b023892 commit 1076d67
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</div>
<script src="../mermaid.js"></script>
<script>
mermaid.initialize({startOnLoad:true});
mermaid.initialize({startOnLoad: true});
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"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.",
"main": "src/mermaid.js",
"keywords": [
Expand Down
21 changes: 15 additions & 6 deletions webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import path from 'path'
import nodeExternals from 'webpack-node-externals'
import ExtractTextPlugin from 'extract-text-webpack-plugin'

const rules = [
{
parser: {
amd: false
},
include: /node_modules\/lodash\//
}
]

export const webConfig = () => {
return {
target: 'web',
Expand All @@ -14,7 +23,7 @@ export const webConfig = () => {
filename: '[name].js'
},
module: {
rules: [
rules: rules.concat([
{
test: /\.js$/,
use: {
Expand All @@ -33,7 +42,7 @@ export const webConfig = () => {
}
}
}
]
])
}
}
}
Expand All @@ -51,7 +60,7 @@ export const nodeConfig = () => {
libraryTarget: 'commonjs2'
},
module: {
rules: [
rules: rules.concat([
{
test: /\.js$/,
use: {
Expand All @@ -67,7 +76,7 @@ export const nodeConfig = () => {
}
}
}
]
])
}
}
}
Expand All @@ -86,7 +95,7 @@ export const lessConfig = () => {
filename: '[name].css'
},
module: {
rules: [
rules: rules.concat([
{
test: /\.less$/,
use: ExtractTextPlugin.extract({
Expand All @@ -101,7 +110,7 @@ export const lessConfig = () => {
]
})
}
]
])
},
plugins: [
new ExtractTextPlugin('[name].css')
Expand Down

0 comments on commit 1076d67

Please sign in to comment.