intlify / intlify/bundle-tools
ERROR: Could not resolve webpack
- Dominant language
- TypeScript
- Stars
- 270
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
### Reporting a bug?
I am using
`import VueI18nVitePlugin from "@intlify/unplugin-vue-i18n/vite";`
`vite: {
resolve: {
alias: {
"vue-i18n": "vue-i18n/dist/vue-i18n.runtime.esm-bundler.js",
},
},
plugins: [
svgLoader(),
VueI18nVitePlugin({
include: [
resolve(dirname(fileURLToPath(import.meta.url)), "./locales/*.json"),
],
}),
],
},`
and when I open my App I get an error that webpack is not installed but I am using vite.
### Expected behavior
No Error
### Reproduction
See code above.
### Issue Package
unplugin-vue-i18n
### System Info
```shell
System:
OS: Windows 10 10.0.22621
CPU: (12) x64 AMD Ryzen 5 5500
Memory: 8.87 GB / 15.90 GB
Binaries:
Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.819.0), Chromium (107.0.1418.42)
Internet Explorer: 11.0.22621.1
npmPackages:
vue-i18n: ^9.2.2 => 9.2.2
```
### Screenshot
_No response_
### Additional context
[vite] error while updating dependencies: 19:31:48
Error: Build failed with 3 errors:
node_modules/@intlify/unplugin-vue-i18n/lib/index.mjs:454:27: ERROR: Could not resolve "webpack"
node_modules/esbuild/lib/main.js:1327:21: ERROR: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
node_modules/esbuild/lib/main.js:1327:21: ERROR: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
### Validations
- [X] Read the [Contributing Guidelines](https://github.com/intlify/bundle-tools/blob/main/.github/contributing.md).
- [X] Read the README
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/intlify/bundle-tools/discussions).
Contributor guide
Assessment
This issue has not been assessed yet.