Skip to content

Commit 389132a

Browse files
Merge pull request #5710 from John-Youngblood/fix/include-source-maps
Include src files in package to resolve source map warnings
2 parents 5884d98 + bac655a commit 389132a

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

package.json

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,23 @@
2424
"./dist/*.css": "./dist/*.css",
2525
"./src/stylesheets/*.scss": "./src/stylesheets/*.scss"
2626
},
27-
"files": ["*.md", "dist", "lib", "es", "src/stylesheets"],
28-
"sideEffects": ["**/*.css"],
29-
"keywords": ["react", "datepicker", "calendar", "date", "react-component"],
27+
"files": [
28+
"*.md",
29+
"dist",
30+
"lib",
31+
"es",
32+
"src"
33+
],
34+
"sideEffects": [
35+
"**/*.css"
36+
],
37+
"keywords": [
38+
"react",
39+
"datepicker",
40+
"calendar",
41+
"date",
42+
"react-component"
43+
],
3044
"repository": {
3145
"type": "git",
3246
"url": "git://github.com/Hacker0x01/react-datepicker.git"
@@ -126,7 +140,10 @@
126140
"prepare": "husky"
127141
},
128142
"lint-staged": {
129-
"*.{js,jsx,ts,tsx,json,css,scss,md}": ["prettier --write", "git add"]
143+
"*.{js,jsx,ts,tsx,json,css,scss,md}": [
144+
"prettier --write",
145+
"git add"
146+
]
130147
},
131148
"packageManager": "[email protected]"
132149
}

rollup.config.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const migrateRollup2to3OutputOptions = {
4141
/** @type {import('rollup').RollupOptions} */
4242
const config = {
4343
input: "src/index.tsx",
44+
sourcemap: true,
4445
output: [
4546
{
4647
file: pkg.unpkg,
@@ -50,11 +51,12 @@ const config = {
5051
banner,
5152
...migrateRollup2to3OutputOptions,
5253
plugins: [terser()],
54+
sourcemap: true,
5355
},
5456
{
5557
file: pkg.unpkg.replace(".min.js", ".js"),
5658
format: "umd",
57-
sourcemap: "inline",
59+
sourcemap: true,
5860
name: "DatePicker",
5961
globals,
6062
banner,
@@ -63,15 +65,15 @@ const config = {
6365
{
6466
file: pkg.main,
6567
format: "cjs",
66-
sourcemap: "inline",
68+
sourcemap: true,
6769
name: "DatePicker",
6870
banner,
6971
...migrateRollup2to3OutputOptions,
7072
},
7173
{
7274
file: pkg.module,
7375
format: "es",
74-
sourcemap: "inline",
76+
sourcemap: true,
7577
banner,
7678
...migrateRollup2to3OutputOptions,
7779
},

0 commit comments

Comments
 (0)