0

I am trying to configure my Git repository into Shopify's Hydrogen panel in oxygen hosting. During my deployment I am getting following error.

Deployment command:

shopify run deploy

Here is my entire code snippets. vite.config.js

/ eslint-disable prettier/prettier /
import {defineConfig} from 'vite';
import hydrogen from '@shopify/hydrogen/plugin';

export default defineConfig({
  plugins: [hydrogen()],
  resolve: {
    alias: [{find: /^~\/(.*)/, replacement: '/src/$1'}],
  },
  optimizeDeps: {
    include: ['@headlessui/react', 'clsx', 'react-use', 'typographic-base'],
  },
  test: {
    globals: true,
    testTimeout: 10000,
    hookTimeout: 10000,
  },
  hmr: {overlay: false},
});

I am getting following error.

enter image description here

So far I have tried with changing import by adding "/index.js".

From :

import {defineConfig} from 'vite';

To

import {defineConfig} from 'vite/dist/node/index.js';

What can I try next?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.