Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"permissions": {
"allow": [
"Bash(conda create:*)",
"Bash(conda activate:*)",
"Bash(npm install:*)",
"Bash(source:*)",
"Bash(conda env remove:*)",
"Bash(export PATH=\"$CONDA_PREFIX/bin:$PATH\")",
"Bash(node:*)",
"Bash(npm:*)",
"Bash(yarn --version)",
"Bash(yarn install:*)",
"Bash(pip install:*)",
"Bash(yarn run build:*)",
"Bash(yarn run lint)",
"Bash(nvm list:*)",
"Bash(yarn dev)",
"Bash(git checkout:*)",
"WebSearch",
"WebFetch(domain:github.com)",
"Bash(grep:*)",
"Bash(yarn lint)",
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(yarn build:*)",
"Bash(yarn rebuild)",
"Bash(npx:*)",
"Bash(./node_modules/.bin/electron-builder:*)",
"Bash(pkill:*)",
"Bash(NODE_ENV=production yarn build:dev)",
"Bash(SKIP_APP_REBUILD=true npx electron-builder --mac --dir)",
"Bash(chmod:*)",
"Bash(./create-app-bundle.sh:*)",
"Bash(open:*)",
"Read(//Applications/MarkText.app/Contents/Resources/app/node_modules/ced/**)",
"Bash(ln:*)",
"Bash(yarn lint:*)",
"Bash(yarn release:*)"
],
"deny": [],
"ask": []
}
}
17 changes: 11 additions & 6 deletions .electron-vue/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const isProduction = process.env.NODE_ENV === 'production'
* that provide pure *.vue files that need compiling
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals
*/
const whiteListedModules = ['vue']
const whiteListedModules = ['vue', 'mermaid', 'cytoscape', 'dagre', 'd3', 'khroma', 'stylis', 'lodash-es', '@braintree/sanitize-url', 'dompurify', 'dayjs', 'uuid', 'internmap', 'delaunator', 'robust-predicates']

/** @type {import('webpack').Configuration} */
const rendererConfig = {
Expand Down Expand Up @@ -89,7 +89,10 @@ const rendererConfig = {
use: 'vue-html-loader'
},
{
test: /\.js$/,
test: /\.m?js$/,
resolve: {
fullySpecified: false
},
use: [
{
loader: 'babel-loader',
Expand All @@ -98,7 +101,7 @@ const rendererConfig = {
}
}
],
exclude: /node_modules/
exclude: /node_modules\/(?!(mermaid|cytoscape|dagre|khroma|stylis|d3|lodash-es|internmap|delaunator|robust-predicates)\/).*/
},
{
test: /\.node$/,
Expand Down Expand Up @@ -212,7 +215,8 @@ const rendererConfig = {
snapsvg: path.join(__dirname, '../src/muya/lib/assets/libs/snap.svg-min.js'),
'vue$': 'vue/dist/vue.esm.js'
},
extensions: ['.js', '.vue', '.json', '.css', '.node']
extensions: ['.mjs', '.js', '.vue', '.json', '.css', '.node'],
fullySpecified: false
},
target: 'electron-renderer'
}
Expand Down Expand Up @@ -250,9 +254,10 @@ if (!isProduction && process.env.MARKTEXT_BUILD_VSCODE_DEBUG) {
* Adjust rendererConfig for production settings
*/
if (isProduction) {
rendererConfig.devtool = 'nosources-source-map'
rendererConfig.devtool = false
rendererConfig.mode = 'production'
rendererConfig.optimization.minimize = true
// Temporarily disable minification for Mermaid v11 compatibility
rendererConfig.optimization.minimize = false

rendererConfig.plugins.push(
new webpack.DefinePlugin({
Expand Down
Loading