Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix: add aliases for better webpack support
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Aug 1, 2022
1 parent ef4acfb commit 7b80db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/core/plugins/import-protection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface ImportProtectionOptions {

export const vueAppPatterns = (nuxt: Nuxt) => [
[/^(nuxt3|nuxt)$/, '`nuxt3`/`nuxt` cannot be imported directly. Instead, import runtime Nuxt composables from `#app` or `#imports`.'],
[/^(\/)?nuxt\.config\./, 'Importing directly from a `nuxt.config` file is not allowed. Instead, use runtime config or a module.'],
[/^((|~|~~|@|@@)\/)?nuxt\.config(\.|$)/, 'Importing directly from a `nuxt.config` file is not allowed. Instead, use runtime config or a module.'],
[/(^|node_modules\/)@vue\/composition-api/],
...nuxt.options.modules.filter(m => typeof m === 'string').map((m: string) =>
[new RegExp(`^${escapeRE(m)}$`), 'Importing directly from module entry points is not allowed.']),
Expand Down

0 comments on commit 7b80db1

Please sign in to comment.