Fix lazy loading for free-jqgrid languages #2803

Webpack put the languages files inside of public/public/build/free-jqgrid.
So we need move that directory inside of public/build/free-jqgrid.
pull/2877/head
Angel Fernando Quiroz Campos 7 years ago
parent 7eb70b29cb
commit 62bad4bb43
  1. 2
      assets/js/free-jqgrid.js
  2. 16
      webpack.config.js

@ -12,6 +12,6 @@ const langs = [
locale = langs.indexOf(locale) !== -1 ? locale : 'en';
import(
/* webpackChunkName: "free-jqgrid/i18n/" */
/* webpackChunkName: "../public/build/free-jqgrid/i18n/" */
'free-jqgrid/js/i18n/grid.locale-' + locale
);

@ -1,5 +1,6 @@
var Encore = require('@symfony/webpack-encore');
var copyWebpackPlugin = require('copy-webpack-plugin');
var fileManagerPlugin = require('filemanager-webpack-plugin');
Encore
.setOutputPath('public/build/')
@ -53,4 +54,19 @@ themes.forEach(function (theme) {
]));
});
// Fix free-jqgrid langiages files
Encore.addPlugin(new fileManagerPlugin({
onEnd: {
move: [
{
source: './public/public/build/free-jqgrid/',
destination: './public/build/free-jqgrid/'
}
],
delete: [
'./public/public/'
]
}
}));
module.exports = Encore.getWebpackConfig();

Loading…
Cancel
Save