|
1 | 1 | import { sveltekit } from '@sveltejs/kit/vite';
|
2 | 2 | import { resolve } from 'path';
|
3 | 3 | import { createRequire } from 'module';
|
| 4 | +import eslint4b, { requireESLintUseAtYourOwnRisk4b } from 'vite-plugin-eslint4b'; |
4 | 5 |
|
5 | 6 | const { version: MONACO_EDITOR_VERSION } = createRequire(import.meta.url)(
|
6 | 7 | 'monaco-editor/package.json'
|
7 | 8 | );
|
8 | 9 |
|
9 | 10 | /** @type {import('vite').UserConfig} */
|
10 | 11 | const config = {
|
11 |
| - plugins: [sveltekit()], |
| 12 | + plugins: [sveltekit(), eslint4b(), requireESLintUseAtYourOwnRisk4b()], |
12 | 13 | server: {
|
13 | 14 | fs: { strict: false }
|
14 | 15 | },
|
15 | 16 | resolve: {
|
16 | 17 | alias: {
|
17 | 18 | assert: resolve('./build-system/shim/assert.js'),
|
18 | 19 | path: resolve('./build-system/shim/path.js'),
|
| 20 | + 'node:path': resolve('./build-system/shim/path.js'), |
| 21 | + util: resolve('./build-system/shim/util.js'), |
19 | 22 | fs: resolve('./build-system/shim/fs.js'),
|
20 | 23 | module: resolve('./build-system/shim/module.js'),
|
21 | 24 |
|
22 | 25 | globby: resolve('./build-system/shim/globby.js'),
|
| 26 | + 'fast-glob': resolve('./build-system/shim/fast-glob.js'), |
23 | 27 | tslib: resolve('./node_modules/tslib/tslib.es6.js'),
|
24 |
| - eslint: resolve('./build-system/shim/eslint.js'), |
25 | 28 | 'svelte-eslint-parser': resolve('./build-system/shim/svelte-eslint-parser.js'),
|
26 | 29 | 'svelte/compiler': resolve('./build-system/shim/svelte/compiler.js')
|
27 | 30 | }
|
|
0 commit comments