Skip to content

Commit c88e8fc

Browse files
committed
Fix regression with webpack
Add some entries to `package.json` to improve compatibility with webpack - Add `import` export as per webpack requirements - Add `style` export for CSS file - Add `*.css` to "side effects" to prevent issues with tree-shaking With this commit, it is possible to import frappe-gantt without breaking changes in webpack-based applications Refs: - https://webpack.js.org/guides/package-exports/ Close frappe#439
1 parent 5bead3a commit c88e8fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
],
2727
"exports": {
2828
".": {
29-
"require": "./dist/frappe-gantt.umd.js"
29+
"require": "./dist/frappe-gantt.umd.js",
30+
"import": "./dist/frappe-gantt.es.js",
31+
"style": "./dist/frappe-gantt.css"
3032
}
3133
},
3234
"keywords": [
@@ -55,5 +57,8 @@
5557
"eslintIgnore": [
5658
"dist"
5759
],
60+
"sideEffects": [
61+
"*.css"
62+
],
5863
"packageManager": "yarn@1.22.22"
5964
}

0 commit comments

Comments
 (0)