mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 08:46:58 +02:00
build(editor): Include shims for sanitize-html (no-changelog) (#17375)
This commit is contained in:
parent
dceafd736a
commit
6fd45eb10d
|
|
@ -125,6 +125,7 @@
|
|||
"unplugin-icons": "catalog:frontend",
|
||||
"unplugin-vue-components": "catalog:frontend",
|
||||
"vite": "catalog:",
|
||||
"vite-plugin-node-polyfills": "^0.24.0",
|
||||
"vite-plugin-static-copy": "2.2.0",
|
||||
"vite-svg-loader": "5.1.0",
|
||||
"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 { 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 { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||
import svgLoader from 'vite-svg-loader';
|
||||
|
||||
import { vitestConfig } from '@n8n/vitest-config/frontend';
|
||||
|
|
@ -63,9 +64,14 @@ const alias = [
|
|||
find: /^lodash\.(.+)$/,
|
||||
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({
|
||||
compiler: 'vue3',
|
||||
autoInstall: true,
|
||||
|
|
@ -125,6 +131,10 @@ const plugins = [
|
|||
return html.replace('%CONFIG_SCRIPT%', replacement);
|
||||
},
|
||||
},
|
||||
// For sanitize-html
|
||||
nodePolyfills({
|
||||
include: ['fs', 'path', 'url', 'util', 'timers'],
|
||||
}),
|
||||
];
|
||||
|
||||
const { RELEASE: release } = process.env;
|
||||
|
|
|
|||
524
pnpm-lock.yaml
524
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user