Simplify webpack config
This commit is contained in:
parent
0a7829fcfe
commit
cbb884edae
|
@ -48,7 +48,6 @@
|
|||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-plugin-lodash": "^3.3.2",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"css-loader": "^0.28.10",
|
||||
"css-to-string-loader": "^0.1.3",
|
||||
|
@ -60,6 +59,7 @@
|
|||
"inject-loader": "^3.0.1",
|
||||
"jasmine": "2.99.0",
|
||||
"jasmine-es6": "^0.4.3",
|
||||
"jest": "^22.4.2",
|
||||
"jison": "^0.4.18",
|
||||
"karma": "^2.0.0",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
|
|
2
todo.md
2
todo.md
|
@ -6,5 +6,7 @@
|
|||
- https://github.com/d3/d3-time-format#api-reference
|
||||
- https://bl.ocks.org/wboykinm/34627426d84f3242e0e6ecb2339e9065
|
||||
- Upgrade jasmine to latest version or replace it
|
||||
- Replace it with Jest
|
||||
- Flowchart interpolate is useless because there is no rendering code using it
|
||||
- Rewrite SCSS code to reduce duplication
|
||||
- No global CSS. Should limit the CSS to mermaid charts only
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue