Skip to content

Commit e7f4c10

Browse files
authored
Merge pull request #1323 from gionkunz/feature/change-publishing-approach
chore: changed publishing approach
2 parents 3f4d63f + 32d74ef commit e7f4c10

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@
3939
"publishConfig": {
4040
"style": "./dist/index.css",
4141
"main": "./dist/index.cjs",
42-
"module": "./dist/index.js",
42+
"module": "./dist/index.esm.js",
43+
"browser": {
44+
"./dist/index.cjs": "./dist/index.umd.js"
45+
},
4346
"exports": {
4447
"require": "./dist/index.cjs",
45-
"import": "./dist/index.js"
48+
"import": "./dist/index.esm.js"
4649
},
4750
"directory": "package"
4851
},

rollup.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,17 @@ export default [
4949
format: 'es',
5050
sourcemap: true
5151
}
52+
},
53+
{
54+
input: pkg.main,
55+
plugins: plugins('defaults, not ie 11, not ie_mob 11'),
56+
external,
57+
output: {
58+
file: pkg.publishConfig.browser[pkg.publishConfig.main],
59+
format: 'iife',
60+
name: 'Chartist',
61+
exports: 'named',
62+
sourcemap: true
63+
}
5264
}
5365
];

0 commit comments

Comments
 (0)