mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-25 22:50:04 +05:30
Fix intl-loader, that was broken after json-loader update
This commit is contained in:
parent
6b3f1037be
commit
b181142d5b
@ -1,12 +1,12 @@
|
||||
module.exports = function() {
|
||||
module.exports = function(content) {
|
||||
this.cacheable && this.cacheable();
|
||||
content = JSON.parse(content);
|
||||
|
||||
var moduleId = this.context
|
||||
const moduleId = this.context
|
||||
.replace(this.options.resolve.root, '')
|
||||
.replace(/^\/|\/$/g, '')
|
||||
.replace(/\//g, '.');
|
||||
|
||||
var content = this.inputValue[0];
|
||||
content = JSON.stringify(Object.keys(content).reduce(function(translations, key) {
|
||||
translations[key] = {
|
||||
id: moduleId + '.' + key,
|
||||
|
@ -178,7 +178,7 @@ const webpackConfig = {
|
||||
},
|
||||
{
|
||||
test: /\.intl\.json$/,
|
||||
loader: 'babel!intl!json'
|
||||
loader: 'babel!intl'
|
||||
},
|
||||
{
|
||||
test: /\.font\.(js|json)$/,
|
||||
|
Loading…
Reference in New Issue
Block a user