Skip to content

Commit ec08c3b

Browse files
committed
fix(Device): avoid modernizr to be treeshaked
1 parent 0ea08c9 commit ec08c3b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/base/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
const rollupConfigFactory = require('../../shared/rollup/configFactory');
22

3-
const config = rollupConfigFactory('base', ['@ui5/webcomponents-core']);
3+
const config = rollupConfigFactory('base', ['@ui5/webcomponents-base']);
44
module.exports = config;

shared/rollup/configFactory.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ const rollupConfigFactory = (pkgName, externals = []) => {
5555
const containsThisModule = (pkg) => id === pkg || id.startsWith(pkg + '/');
5656
return externalModules.some(containsThisModule);
5757
},
58-
treeshake: {
59-
moduleSideEffects: (id) => micromatch.isMatch(id, packageJson.sideEffects)
60-
},
58+
treeshake: file.includes('Device')
59+
? false
60+
: {
61+
moduleSideEffects: (id) => micromatch.isMatch(id, packageJson.sideEffects)
62+
},
6163
output: [
6264
{
6365
file: path.resolve(

0 commit comments

Comments
 (0)