File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 33 "version" : " 9.0.0-alpha" ,
44 "description" : " The frontend code and styles for Blacklight" ,
55 "main" : " app/assets/javascripts/blacklight" ,
6+ "type" : " module" ,
67 "module" : " app/assets/javascripts/blacklight/blacklight.esm.js" ,
78 "scripts" : {
89 "prepare" : " rollup --config rollup.config.js --sourcemap && ESM=true rollup --config rollup.config.js --sourcemap"
2223 },
2324 "homepage" : " https://github.com/projectblacklight/blacklight#readme" ,
2425 "devDependencies" : {
25- "rollup" : " ^2.60 .0" ,
26+ "rollup" : " ^4.24 .0" ,
2627 "rollup-plugin-includepaths" : " ^0.2.4"
2728 },
2829 "browserslist" : [
Original file line number Diff line number Diff line change 1- 'use strict'
2-
31import includePaths from 'rollup-plugin-includepaths' ;
42
5- const path = require ( 'path' )
63
74const BUNDLE = process . env . BUNDLE === 'true'
85const ESM = process . env . ESM === 'true'
@@ -19,19 +16,16 @@ let includePathOptions = {
1916} ;
2017
2118const rollupConfig = {
22- input : path . resolve ( __dirname , ` app/javascript/blacklight/index.js` ) ,
19+ input : ' app/javascript/blacklight/index.js' ,
2320 output : {
24- file : path . resolve ( __dirname , `app/assets/javascripts/blacklight/${ fileDest } .js` ) ,
25- format : ESM ? 'esm ' : 'umd' ,
21+ file : `app/assets/javascripts/blacklight/${ fileDest } .js` ,
22+ format : ESM ? 'es ' : 'umd' ,
2623 globals,
27- generatedCode : 'es2015'
24+ generatedCode : { preset : 'es2015' } ,
25+ name : ESM ? undefined : 'Blacklight'
2826 } ,
2927 external,
3028 plugins : [ includePaths ( includePathOptions ) ]
3129}
3230
33- if ( ! ESM ) {
34- rollupConfig . output . name = 'Blacklight'
35- }
36-
37- module . exports = rollupConfig
31+ export default rollupConfig
You can’t perform that action at this time.
0 commit comments