Simplify webpack config

This commit is contained in:
Tyler Long
2018-03-09 20:49:12 +08:00
parent 0a7829fcfe
commit cbb884edae
4 changed files with 947 additions and 96 deletions

View File

@@ -48,7 +48,6 @@
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.0", "babel-core": "^6.26.0",
"babel-loader": "^7.1.4", "babel-loader": "^7.1.4",
"babel-plugin-lodash": "^3.3.2",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"css-loader": "^0.28.10", "css-loader": "^0.28.10",
"css-to-string-loader": "^0.1.3", "css-to-string-loader": "^0.1.3",
@@ -60,6 +59,7 @@
"inject-loader": "^3.0.1", "inject-loader": "^3.0.1",
"jasmine": "2.99.0", "jasmine": "2.99.0",
"jasmine-es6": "^0.4.3", "jasmine-es6": "^0.4.3",
"jest": "^22.4.2",
"jison": "^0.4.18", "jison": "^0.4.18",
"karma": "^2.0.0", "karma": "^2.0.0",
"karma-chrome-launcher": "^2.2.0", "karma-chrome-launcher": "^2.2.0",

View File

@@ -6,5 +6,7 @@
- https://github.com/d3/d3-time-format#api-reference - https://github.com/d3/d3-time-format#api-reference
- https://bl.ocks.org/wboykinm/34627426d84f3242e0e6ecb2339e9065 - https://bl.ocks.org/wboykinm/34627426d84f3242e0e6ecb2339e9065
- Upgrade jasmine to latest version or replace it - Upgrade jasmine to latest version or replace it
- Replace it with Jest
- Flowchart interpolate is useless because there is no rendering code using it - Flowchart interpolate is useless because there is no rendering code using it
- Rewrite SCSS code to reduce duplication - Rewrite SCSS code to reduce duplication
- No global CSS. Should limit the CSS to mermaid charts only

View File

@@ -1,23 +1,16 @@
import path from 'path' import path from 'path'
const lodashRule = { const amdRule = {
parser: { parser: {
amd: false amd: false // https://github.com/lodash/lodash/issues/3052
}, }
include: /node_modules\/lodash\// // https://github.com/lodash/lodash/issues/3052
} }
const jsRule = { const jsRule = {
test: /\.js$/, test: /\.js$/,
exclude: /node_modules/, exclude: /node_modules/,
use: { use: {
loader: 'babel-loader', loader: 'babel-loader'
options: {
presets: [
'env'
],
plugins: ['lodash']
}
} }
} }
@@ -48,7 +41,7 @@ export const jsConfig = () => {
libraryExport: 'default' libraryExport: 'default'
}, },
module: { module: {
rules: [lodashRule, jsRule, scssRule] rules: [amdRule, jsRule, scssRule]
}, },
devtool: 'source-map' devtool: 'source-map'
} }

1022
yarn.lock

File diff suppressed because it is too large Load Diff