Relative paths for require
Now we can use relative paths in the calls to `require`, so those using relative builds don't have to worry about modules not being imported properly. This also makes it considerably easier in the future when we look to cut down the build sizes and have a custom builder, as we don't have to worry as much about the paths being incorrect. This fixes https://github.com/select2/select2/issues/3014 finally.
This commit is contained in:
parent
d1e8a6fdad
commit
7e4e8bc9d6
9
dist/js/select2.full.js
vendored
9
dist/js/select2.full.js
vendored
@ -4200,6 +4200,7 @@ S2.define('select2/i18n/en',[],function () {
|
|||||||
|
|
||||||
S2.define('select2/defaults',[
|
S2.define('select2/defaults',[
|
||||||
'jquery',
|
'jquery',
|
||||||
|
'require',
|
||||||
'./results',
|
'./results',
|
||||||
|
|
||||||
'./selection/single',
|
'./selection/single',
|
||||||
@ -4232,7 +4233,9 @@ S2.define('select2/defaults',[
|
|||||||
'./dropdown/closeOnSelect',
|
'./dropdown/closeOnSelect',
|
||||||
|
|
||||||
'./i18n/en'
|
'./i18n/en'
|
||||||
], function ($, ResultsList,
|
], function ($, require,
|
||||||
|
|
||||||
|
ResultsList,
|
||||||
|
|
||||||
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
||||||
SelectionSearch, EventRelay,
|
SelectionSearch, EventRelay,
|
||||||
@ -4515,8 +4518,8 @@ S2.define('select2/defaults',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
amdBase: 'select2/',
|
amdBase: './',
|
||||||
amdLanguageBase: 'select2/i18n/',
|
amdLanguageBase: './i18n/',
|
||||||
closeOnSelect: true,
|
closeOnSelect: true,
|
||||||
debug: false,
|
debug: false,
|
||||||
escapeMarkup: Utils.escapeMarkup,
|
escapeMarkup: Utils.escapeMarkup,
|
||||||
|
2
dist/js/select2.full.min.js
vendored
2
dist/js/select2.full.min.js
vendored
File diff suppressed because one or more lines are too long
9
dist/js/select2.js
vendored
9
dist/js/select2.js
vendored
@ -4200,6 +4200,7 @@ S2.define('select2/i18n/en',[],function () {
|
|||||||
|
|
||||||
S2.define('select2/defaults',[
|
S2.define('select2/defaults',[
|
||||||
'jquery',
|
'jquery',
|
||||||
|
'require',
|
||||||
'./results',
|
'./results',
|
||||||
|
|
||||||
'./selection/single',
|
'./selection/single',
|
||||||
@ -4232,7 +4233,9 @@ S2.define('select2/defaults',[
|
|||||||
'./dropdown/closeOnSelect',
|
'./dropdown/closeOnSelect',
|
||||||
|
|
||||||
'./i18n/en'
|
'./i18n/en'
|
||||||
], function ($, ResultsList,
|
], function ($, require,
|
||||||
|
|
||||||
|
ResultsList,
|
||||||
|
|
||||||
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
||||||
SelectionSearch, EventRelay,
|
SelectionSearch, EventRelay,
|
||||||
@ -4515,8 +4518,8 @@ S2.define('select2/defaults',[
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
amdBase: 'select2/',
|
amdBase: './',
|
||||||
amdLanguageBase: 'select2/i18n/',
|
amdLanguageBase: './i18n/',
|
||||||
closeOnSelect: true,
|
closeOnSelect: true,
|
||||||
debug: false,
|
debug: false,
|
||||||
escapeMarkup: Utils.escapeMarkup,
|
escapeMarkup: Utils.escapeMarkup,
|
||||||
|
2
dist/js/select2.min.js
vendored
2
dist/js/select2.min.js
vendored
File diff suppressed because one or more lines are too long
10
src/js/select2/defaults.js
vendored
10
src/js/select2/defaults.js
vendored
@ -1,5 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'jquery',
|
'jquery',
|
||||||
|
'require',
|
||||||
|
|
||||||
'./results',
|
'./results',
|
||||||
|
|
||||||
'./selection/single',
|
'./selection/single',
|
||||||
@ -32,7 +34,9 @@ define([
|
|||||||
'./dropdown/closeOnSelect',
|
'./dropdown/closeOnSelect',
|
||||||
|
|
||||||
'./i18n/en'
|
'./i18n/en'
|
||||||
], function ($, ResultsList,
|
], function ($, require,
|
||||||
|
|
||||||
|
ResultsList,
|
||||||
|
|
||||||
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
||||||
SelectionSearch, EventRelay,
|
SelectionSearch, EventRelay,
|
||||||
@ -315,8 +319,8 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
amdBase: 'select2/',
|
amdBase: './',
|
||||||
amdLanguageBase: 'select2/i18n/',
|
amdLanguageBase: './i18n/',
|
||||||
closeOnSelect: true,
|
closeOnSelect: true,
|
||||||
debug: false,
|
debug: false,
|
||||||
escapeMarkup: Utils.escapeMarkup,
|
escapeMarkup: Utils.escapeMarkup,
|
||||||
|
Loading…
Reference in New Issue
Block a user