You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I execute the command a compilation error occured :
error in ./src/i18n/helloWorld.json?vue&type=custom&index=0&blockType=i18n&issuerPath=%2Fhome%2Fcharles.jourdan%2FWorkspace%2Fperso%2Fpouet%2Fsrc%2Fcomponents%2FHelloWorld.vue
Module parse failed: Unexpected token i in JSON at position 0 while parsing near 'import mod from "-!....'
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token i in JSON at position 0 while parsing near 'import mod from "-!....'
at JSON.parse (<anonymous>)
at parseJson (/home/charles.jourdan/Workspace/perso/pouet/node_modules/json-parse-better-errors/index.js:7:17)
at JsonParser.parse (/home/charles.jourdan/Workspace/perso/pouet/node_modules/webpack/lib/JsonParser.js:16:16)
at doBuild.err (/home/charles.jourdan/Workspace/perso/pouet/node_modules/webpack/lib/NormalModule.js:445:32)
at runLoaders (/home/charles.jourdan/Workspace/perso/pouet/node_modules/webpack/lib/NormalModule.js:327:12)
at /home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/LoaderRunner.js:370:3
at iterateNormalLoaders (/home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/LoaderRunner.js:211:10)
at /home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/LoaderRunner.js:183:6
at runSyncOrAsync (/home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
at /home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/LoaderRunner.js:175:3
at loadLoader (/home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/loadLoader.js:36:3)
at iteratePitchingLoaders (/home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at runLoaders (/home/charles.jourdan/Workspace/perso/pouet/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
at NormalModule.doBuild (/home/charles.jourdan/Workspace/perso/pouet/node_modules/webpack/lib/NormalModule.js:265:3)
at NormalModule.build (/home/charles.jourdan/Workspace/perso/pouet/node_modules/webpack/lib/NormalModule.js:412:15)
at Compilation.buildModule (/home/charles.jourdan/Workspace/perso/pouet/node_modules/webpack/lib/Compilation.js:616:10)
@ ./src/components/HelloWorld.vue 21:0-184 22:11-17 22:34-40
@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
@ ./src/App.vue?vue&type=script&lang=js&
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.0.11:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
When I don't use src, it's working like a charm. I think when you put src attribute, webpack embed the json file in an import. Maybe it's just a missconfiguration, but I start a new project from scratch and follow the step on different documentation.
Thanks for reading and helping.
The text was updated successfully, but these errors were encountered:
vue & vue-i18n version
vue : 2.5.16
vue-18n : 8.0.0
vue-i18n-loader : 0.3.0
Reproduction Link
https://github.com/deather/vue-i18n-loader-bug
Steps to reproduce
You just need to execute :
npm run serve
What is Expected?
No compilation error.
What is actually happening?
When I execute the command a compilation error occured :
When I don't use src, it's working like a charm. I think when you put src attribute, webpack embed the json file in an import. Maybe it's just a missconfiguration, but I start a new project from scratch and follow the step on different documentation.
Thanks for reading and helping.
The text was updated successfully, but these errors were encountered: