我从 i18n aurelia 收到一个错误
I got a error from i18n aurelia
我浏览了一些 i18n 教程,但出现错误。
这是我得到的错误
ERROR in ./src/locales/en-GB_translation.json
(./node_modules/bundle-loader?lazy&name=lang-en-GB!./src/locales/en-GB_translation.json)
Module parse failed: Unexpected token m in JSON at position 0 while
parsing near ‘module.exports = fun…’ You may need an appropriate
loader to handle this file type. SyntaxError: Unexpected token m in
JSON at position 0 while parsing near ‘module.exports = fun…’
我正在为这个项目使用 webpack。
请帮我解决这个问题。
将此配置添加到我的项目 webpack 配置中
{ test: /.json$/i, loader: ‘json-loader’, type: ‘javascript/auto’ },
然后我安装 json-loader 因为我没有将该包安装到我的项目中。
我浏览了一些 i18n 教程,但出现错误。
这是我得到的错误
ERROR in ./src/locales/en-GB_translation.json (./node_modules/bundle-loader?lazy&name=lang-en-GB!./src/locales/en-GB_translation.json) Module parse failed: Unexpected token m in JSON at position 0 while parsing near ‘module.exports = fun…’ You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token m in JSON at position 0 while parsing near ‘module.exports = fun…’
我正在为这个项目使用 webpack。
请帮我解决这个问题。
将此配置添加到我的项目 webpack 配置中
{ test: /.json$/i, loader: ‘json-loader’, type: ‘javascript/auto’ },
然后我安装 json-loader 因为我没有将该包安装到我的项目中。