diff options
author | Leandro Alves <leandroalves@yahooinc.com> | 2022-06-20 21:04:04 +0200 |
---|---|---|
committer | Leandro Alves <leandroalves@yahooinc.com> | 2022-06-20 21:04:04 +0200 |
commit | 55363f1f98563d808b65e4868529b8bfbfb3f623 (patch) | |
tree | 933548e7b72d8349ea51ec9b8fb07d7a77804dd3 /client | |
parent | 82f79d8610a18a66746565b0811f550319098f86 (diff) |
Setting absolute import
Diffstat (limited to 'client')
-rw-r--r-- | client/js/app/jsconfig.json | 7 | ||||
-rw-r--r-- | client/js/app/vite.config.js | 24 |
2 files changed, 27 insertions, 4 deletions
diff --git a/client/js/app/jsconfig.json b/client/js/app/jsconfig.json new file mode 100644 index 00000000000..290508f30d0 --- /dev/null +++ b/client/js/app/jsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "baseUrl": "src" + }, + "include": ["src"], + "exclude": ["node_modules", "build", "dist"] +} diff --git a/client/js/app/vite.config.js b/client/js/app/vite.config.js index b1b5f91e5ff..de091b18d41 100644 --- a/client/js/app/vite.config.js +++ b/client/js/app/vite.config.js @@ -1,7 +1,23 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import * as path from 'path'; +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()] -}) + build: { + sourcemap: 'hidden', + rollupOptions: { + output: { + manualChunks(id) { + return id.includes('node_modules') ? 'vendor' : 'main'; + }, + }, + }, + }, + plugins: [react()], + resolve: { + alias: { + app: path.resolve(__dirname, 'src/app'), + }, + }, +}); |