mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
build(editor): Include shims for sanitize-html (no-changelog) (#17375)
This commit is contained in:
@@ -125,6 +125,7 @@
|
|||||||
"unplugin-icons": "catalog:frontend",
|
"unplugin-icons": "catalog:frontend",
|
||||||
"unplugin-vue-components": "catalog:frontend",
|
"unplugin-vue-components": "catalog:frontend",
|
||||||
"vite": "catalog:",
|
"vite": "catalog:",
|
||||||
|
"vite-plugin-node-polyfills": "^0.24.0",
|
||||||
"vite-plugin-static-copy": "2.2.0",
|
"vite-plugin-static-copy": "2.2.0",
|
||||||
"vite-svg-loader": "5.1.0",
|
"vite-svg-loader": "5.1.0",
|
||||||
"vitest": "catalog:",
|
"vitest": "catalog:",
|
||||||
|
|||||||
1
packages/frontend/editor-ui/src/source-map-js-shim.ts
Normal file
1
packages/frontend/editor-ui/src/source-map-js-shim.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export default {};
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import { posix as pathPosix, resolve } from 'path';
|
import { posix as pathPosix, resolve } from 'path';
|
||||||
import { defineConfig, mergeConfig } from 'vite';
|
import { defineConfig, mergeConfig, type UserConfig } from 'vite';
|
||||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||||
|
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||||
import svgLoader from 'vite-svg-loader';
|
import svgLoader from 'vite-svg-loader';
|
||||||
|
|
||||||
import { vitestConfig } from '@n8n/vitest-config/frontend';
|
import { vitestConfig } from '@n8n/vitest-config/frontend';
|
||||||
@@ -63,9 +64,14 @@ const alias = [
|
|||||||
find: /^lodash\.(.+)$/,
|
find: /^lodash\.(.+)$/,
|
||||||
replacement: 'lodash/$1',
|
replacement: 'lodash/$1',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// For sanitize-html
|
||||||
|
find: 'source-map-js',
|
||||||
|
replacement: resolve(__dirname, 'src/source-map-js-shim'),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const plugins = [
|
const plugins: UserConfig['plugins'] = [
|
||||||
icons({
|
icons({
|
||||||
compiler: 'vue3',
|
compiler: 'vue3',
|
||||||
autoInstall: true,
|
autoInstall: true,
|
||||||
@@ -125,6 +131,10 @@ const plugins = [
|
|||||||
return html.replace('%CONFIG_SCRIPT%', replacement);
|
return html.replace('%CONFIG_SCRIPT%', replacement);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// For sanitize-html
|
||||||
|
nodePolyfills({
|
||||||
|
include: ['fs', 'path', 'url', 'util', 'timers'],
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
const { RELEASE: release } = process.env;
|
const { RELEASE: release } = process.env;
|
||||||
|
|||||||
524
pnpm-lock.yaml
generated
524
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user