Skip to content

Commit

Permalink
fix: support legacy @nuxt/kit
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Dec 23, 2021
1 parent 6e95c59 commit 991ea2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nuxt-webpack-optimisations/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
declaration: true,
emitCJS: false,
rollup: {
emitCJS: false,
},
entries: [
'src/module',
],
Expand Down
5 changes: 5 additions & 0 deletions packages/nuxt-webpack-optimisations/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export default defineNuxtModule<NuxtWebpackOptimisationOptions>({
version,
configKey: NUXT_CONFIG_KEY,
},
// support @nuxt/kit legacy
// @ts-ignore
configKey: CONFIG_KEY,
// @ts-ignore
name: NAME,
defaults: defaultOptions,
async setup(webpackOptimisationOptions: NuxtWebpackOptimisationOptions, nuxt) {
const logger = consola.withScope(NAME)
Expand Down

0 comments on commit 991ea2f

Please sign in to comment.