mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-08 10:06:40 +02:00
babel-eslint => @babel/eslint-parser and remove babel-core and webpack-bundle-analyzer and yarn-upgrade-all config
remove babel-core and webpack-bundle-analyzer and yarn-upgrade-all config
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import path from 'path';
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
const amdRule = {
|
||||
parser: {
|
||||
amd: false // https://github.com/lodash/lodash/issues/3052
|
||||
}
|
||||
amd: false, // https://github.com/lodash/lodash/issues/3052
|
||||
},
|
||||
};
|
||||
|
||||
const jisonRule = {
|
||||
@@ -12,25 +11,25 @@ const jisonRule = {
|
||||
use: {
|
||||
loader: path.resolve(__dirname, './jisonLoader'),
|
||||
options: {
|
||||
'token-stack': true
|
||||
}
|
||||
}
|
||||
'token-stack': true,
|
||||
},
|
||||
},
|
||||
};
|
||||
const jsRule = {
|
||||
test: /\.js$/,
|
||||
include: [
|
||||
path.resolve(__dirname, './src'),
|
||||
path.resolve(__dirname, './node_modules/dagre-d3-renderer/lib')
|
||||
path.resolve(__dirname, './node_modules/dagre-d3-renderer/lib'),
|
||||
],
|
||||
use: {
|
||||
loader: 'babel-loader'
|
||||
}
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
};
|
||||
|
||||
const scssRule = {
|
||||
// load scss to string
|
||||
test: /\.scss$/,
|
||||
use: [{ loader: 'css-to-string-loader' }, { loader: 'css-loader' }, { loader: 'sass-loader' }]
|
||||
use: [{ loader: 'css-to-string-loader' }, { loader: 'css-loader' }, { loader: 'sass-loader' }],
|
||||
};
|
||||
|
||||
export const jsConfig = () => {
|
||||
@@ -38,13 +37,13 @@ export const jsConfig = () => {
|
||||
mode: 'development',
|
||||
target: 'web',
|
||||
entry: {
|
||||
mermaid: './src/mermaid.js'
|
||||
mermaid: './src/mermaid.js',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.wasm', '.mjs', '.js', '.json', '.jison']
|
||||
extensions: ['.wasm', '.mjs', '.js', '.json', '.jison'],
|
||||
},
|
||||
node: {
|
||||
fs: 'empty' // jison generated code requires 'fs'
|
||||
fs: 'empty', // jison generated code requires 'fs'
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, './dist/'),
|
||||
@@ -52,12 +51,11 @@ export const jsConfig = () => {
|
||||
library: 'mermaid',
|
||||
libraryTarget: 'umd',
|
||||
libraryExport: 'default',
|
||||
globalObject: 'typeof self !== "undefined" ? self : this'
|
||||
globalObject: 'typeof self !== "undefined" ? self : this',
|
||||
},
|
||||
module: {
|
||||
rules: [amdRule, jsRule, scssRule, jisonRule]
|
||||
rules: [amdRule, jsRule, scssRule, jisonRule],
|
||||
},
|
||||
// plugins: [new BundleAnalyzerPlugin()],
|
||||
devtool: 'source-map'
|
||||
devtool: 'source-map',
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user