File tree Expand file tree Collapse file tree 3 files changed +3
-20
lines changed
build-modules-js/javascript Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,6 @@ import { babel } from '@rollup/plugin-babel';
1010import { minifyCode } from './minify.mjs' ;
1111import { getPackagesUnderScope } from '../init/common/resolve-package.cjs' ;
1212
13- function esmOrIife ( file ) {
14- if ( file . endsWith ( 'core.es6.js' ) || file . endsWith ( 'validate.es6.js' ) ) {
15- return 'iife' ;
16- }
17- return 'es' ;
18- }
19-
2013// List of external modules that should not be resolved by rollup
2114const externalModules = [ ] ;
2215const collectExternals = ( ) => {
@@ -91,7 +84,7 @@ export const handleESMFile = async (file) => {
9184 } ) ;
9285
9386 bundle . write ( {
94- format : esmOrIife ( file ) ,
87+ format : file . endsWith ( 'core.es6.js' ) ? 'iife' : 'es' ,
9588 sourcemap : false ,
9689 file : resolve ( `${ newPath } .js` ) ,
9790 } )
Original file line number Diff line number Diff line change 173173 "type" : " script" ,
174174 "class" : " FormValidateAssetItem" ,
175175 "attributes" : {
176- "defer " : true
176+ "type " : " module "
177177 },
178178 "dependencies" : [
179179 " core"
Original file line number Diff line number Diff line change 22 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
33 * @license GNU General Public License version 2 or later; see LICENSE.txt
44 */
5-
6- 'use strict' ;
7-
85import punycode from 'punycode' ;
96
107class JFormValidator {
@@ -317,14 +314,7 @@ class JFormValidator {
317314 }
318315}
319316
320- const initialize = ( ) => {
321- document . formvalidator = new JFormValidator ( ) ;
322-
323- // Cleanup
324- document . removeEventListener ( 'DOMContentLoaded' , initialize ) ;
325- } ;
326-
327- document . addEventListener ( 'DOMContentLoaded' , initialize ) ;
317+ document . formvalidator = new JFormValidator ( ) ;
328318
329319/**
330320 * Expose the classes to the global scope
You can’t perform that action at this time.
0 commit comments