Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default export is not a function in 0.4.0 #11

Closed
wopian opened this issue Jan 10, 2022 · 2 comments
Closed

Default export is not a function in 0.4.0 #11

wopian opened this issue Jan 10, 2022 · 2 comments

Comments

@wopian
Copy link

wopian commented Jan 10, 2022

Upgrading from 0.3.6 to 0.4.0 results in a build error that the default export is not a function.

Vite config:

import { defineConfig } from 'vite' // 2.7.10
import compression from 'vite-plugin-compression'

export default defineConfig({
  plugins: [
    ...,
    compression()
  ]
})

Build log:

$ vite build
failed to load config from /home/runner/work/.../vite.config.js
error during build:
TypeError: compression is not a function
    at file:///home/runner/work/.../vite.config.js?t=1641808119900:51:5
    at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
    at async loadConfigFromFile (/home/runner/work/.../node_modules/vite/dist/node/chunks/dep-76613303.js:75061:31)
    at async resolveConfig (/home/runner/work/.../node_modules/vite/dist/node/chunks/dep-76613303.js:74639:28)
    at async doBuild (/home/runner/work/.../node_modules/vite/dist/node/chunks/dep-76613303.js:37652:20)
    at async build (/home/runner/work/.../node_modules/vite/dist/node/chunks/dep-76613303.js:37640:16)
    at async CAC.<anonymous> (/home/runner/work/.../node_modules/vite/dist/node/cli.js:738:9)
error Command failed with exit code 1.
@anncwb
Copy link
Collaborator

anncwb commented Jan 28, 2022

try 0.5.0

@anncwb anncwb closed this as completed Jan 28, 2022
@wopian
Copy link
Author

wopian commented Jan 31, 2022

Updating to 0.5.1 after #13 was fixed works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants