mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-08 10:06:40 +02:00
Simplify webpack config
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
import path from 'path'
|
||||
|
||||
const lodashRule = {
|
||||
const amdRule = {
|
||||
parser: {
|
||||
amd: false
|
||||
},
|
||||
include: /node_modules\/lodash\// // https://github.com/lodash/lodash/issues/3052
|
||||
amd: false // https://github.com/lodash/lodash/issues/3052
|
||||
}
|
||||
}
|
||||
|
||||
const jsRule = {
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [
|
||||
'env'
|
||||
],
|
||||
plugins: ['lodash']
|
||||
}
|
||||
loader: 'babel-loader'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +41,7 @@ export const jsConfig = () => {
|
||||
libraryExport: 'default'
|
||||
},
|
||||
module: {
|
||||
rules: [lodashRule, jsRule, scssRule]
|
||||
rules: [amdRule, jsRule, scssRule]
|
||||
},
|
||||
devtool: 'source-map'
|
||||
}
|
||||
|
Reference in New Issue
Block a user