intlify / intlify/bundle-tools
Webpack + vue.config.js failed to compile
- Dominant language
- TypeScript
- Stars
- 270
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
### Reporting a bug?
I've added this to my `vue.config.js`:
```
const path = require('path');
const VueI18nPlugin = require('@intlify/unplugin-vue-i18n/webpack');
module.exports = {
configureWebpack: {
plugins: [
VueI18nPlugin({
include: path.resolve(__dirname, './src/locales/**')
})
],
```
### Expected behavior
`yarn build` should work as before.
### Reproduction
https://github.com/Glandos/unplugin-vue-i18n-issue222
- yarn
- yarn serve
### Issue Package
unplugin-vue-i18n
### System Info
```shell
System:
OS: Linux 6.1 Debian GNU/Linux bookworm/sid
CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Memory: 16.50 GB / 31.21 GB
Container: Yes
Shell: 3.5.1 - /usr/bin/fish
Binaries:
Node: 16.19.0 - /tmp/fnm_multishells/68944_1675784800039/bin/node
Yarn: 3.3.1 - /usr/local/bin/yarn
npm: 8.19.3 - /tmp/fnm_multishells/68944_1675784800039/bin/npm
Browsers:
Chromium: 109.0.5414.119
Firefox: 109.0
npmPackages:
vue: ^2.7.14 => 2.7.14
vue-i18n: ^8.28.2 => 8.28.2
webpack: ^5 => 5.75.0
```
### Screenshot
```
Error: Child compilation failed:
Module parse failed: Unexpected token (1:0)
File was processed with these loaders:
* ./node_modules/unplugin/dist/webpack/loaders/load.js
* ./node_modules/html-webpack-plugin/lib/loader.js
You may need an additional loader to handle the result of these loaders.
>
|
|
```
### Additional context
_No response_
### 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.