Skip to content

Commit 0c220fe

Browse files
committed
Make jquery-ui a peerdependency
1 parent 93fe949 commit 0c220fe

File tree

6 files changed

+36
-11
lines changed

6 files changed

+36
-11
lines changed

package-lock.json

Lines changed: 22 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
"dompurify": "^3.0.6",
2727
"fine-uploader": "^5.16.2",
2828
"jquery-simulate": "^1.0.2",
29-
"jquery-ui": "^1.13.2",
3029
"mousetrap": "^1.6.5",
3130
"q": "^1.5.1",
3231
"slickgrid": "^4.0.1",
3332
"validator": "^13.11.0"
3433
},
3534
"peerDependencies": {
3635
"jquery": "^3.7.1",
36+
"jquery-ui-dist": "^1.13.2",
3737
"postcss": "^8.2.2"
3838
},
3939
"devDependencies": {
@@ -58,6 +58,7 @@
5858
"error-logger-webpack-plugin": "^1.1.1",
5959
"eslint": "^8.50.0",
6060
"glob": "^10.3.10",
61+
"jquery-ui": "^1.13.2",
6162
"less": "^4.2.0",
6263
"less-loader": "^11.1.3",
6364
"mini-css-extract-plugin": "^2.7.6",

src/main/resources/assets/admin/common/js/dom/Element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as Q from 'q';
2-
import 'jquery-ui/ui/tabbable';
2+
// import 'jquery-ui/ui/tabbable'; // jquery-ui is a peerDependency
33
import {StyleHelper} from '../StyleHelper';
44
import {StringHelper} from '../util/StringHelper';
55
import {ObjectHelper} from '../ObjectHelper';

src/main/resources/assets/admin/common/js/form/inputtype/support/BaseInputTypeNotManagingAdd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'jquery-ui/ui/widgets/sortable'; // jquery-ui is a peerDependency
1+
// import 'jquery-ui/ui/widgets/sortable'; // jquery-ui is a peerDependency
22
import * as Q from 'q';
33
import {Property} from '../../../data/Property';
44
import {PropertyArray} from '../../../data/PropertyArray';

src/main/resources/assets/admin/common/js/ui/selector/combobox/BaseSelectedOptionsView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'jquery-ui/ui/widgets/sortable';
1+
// import 'jquery-ui/ui/widgets/sortable'; // jquery-ui is a peerDependency
22
import {DivEl} from '../../../dom/DivEl';
33
import {Element} from '../../../dom/Element';
44
import {Option} from '../Option';

webpack.config.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
22
const CircularDependencyPlugin = require('circular-dependency-plugin');
33
const TerserPlugin = require('terser-webpack-plugin');
4-
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
4+
// const ProvidePlugin = require('webpack/lib/ProvidePlugin');
55
const path = require('path');
66
const fs = require('fs');
77

@@ -18,6 +18,9 @@ module.exports = {
1818
'styles/lib': './styles/main.less',
1919
'styles/lib.lite': './styles/main.lite.less',
2020
},
21+
externals: {
22+
jquery: 'jQuery',
23+
},
2124
output: {
2225
path: path.join(__dirname, '/build/resources/main/assets/admin/common'),
2326
filename: './[name].js',
@@ -70,11 +73,11 @@ module.exports = {
7073
]
7174
},
7275
plugins: [
73-
new ProvidePlugin({
74-
$: 'jquery',
75-
jQuery: 'jquery',
76-
'window.jQuery': 'jquery'
77-
}),
76+
// new ProvidePlugin({
77+
// $: 'jquery',
78+
// jQuery: 'jquery',
79+
// 'window.jQuery': 'jquery'
80+
// }),
7881
new MiniCssExtractPlugin({
7982
filename: '[name].css',
8083
chunkFilename: './styles/[id].css'

0 commit comments

Comments
 (0)