diff --git a/.yarn/cache/@rollup-plugin-node-resolve-npm-13.0.0-c6322a1c60-c0237e65f5.zip b/.yarn/cache/@rollup-plugin-node-resolve-npm-13.0.0-c6322a1c60-c0237e65f5.zip new file mode 100644 index 000000000000..edb81241b5bd Binary files /dev/null and b/.yarn/cache/@rollup-plugin-node-resolve-npm-13.0.0-c6322a1c60-c0237e65f5.zip differ diff --git a/packages/feature-flags/package.json b/packages/feature-flags/package.json index 76ee87e547d1..29aef8de116b 100644 --- a/packages/feature-flags/package.json +++ b/packages/feature-flags/package.json @@ -33,10 +33,14 @@ "watch": "yarn clean && node tasks/build.js && rollup -c -w" }, "devDependencies": { + "@babel/core": "^7.14.6", "@babel/generator": "^7.14.5", + "@babel/preset-env": "^7.14.7", "@babel/template": "^7.14.5", "@babel/types": "^7.14.5", "@carbon/scss-generator": "^10.13.0", + "@rollup/plugin-babel": "^5.3.0", + "@rollup/plugin-node-resolve": "^13.0.0", "change-case": "^4.1.2", "fs-extra": "^9.0.1", "js-yaml": "^3.14.0", @@ -44,5 +48,10 @@ "rollup": "^2.46.0", "rollup-plugin-strip-banner": "^2.0.0" }, + "babel": { + "presets": [ + "@babel/env" + ] + }, "sideEffects": false } diff --git a/packages/feature-flags/rollup.config.js b/packages/feature-flags/rollup.config.js index 53775d49c099..361fdf0eadf2 100644 --- a/packages/feature-flags/rollup.config.js +++ b/packages/feature-flags/rollup.config.js @@ -6,6 +6,8 @@ */ import path from 'path'; +import resolve from '@rollup/plugin-node-resolve'; +import babel from '@rollup/plugin-babel'; import stripBanner from 'rollup-plugin-strip-banner'; const BANNER = `/** @@ -19,6 +21,8 @@ const BANNER = `/** const baseConfig = { external: [], plugins: [ + resolve(), + babel({ babelHelpers: 'bundled' }), stripBanner(), { renderChunk(code) { diff --git a/yarn.lock b/yarn.lock index 6042b4bf98ff..b0f97aab3236 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1792,10 +1792,14 @@ __metadata: version: 0.0.0-use.local resolution: "@carbon/feature-flags@workspace:packages/feature-flags" dependencies: + "@babel/core": ^7.14.6 "@babel/generator": ^7.14.5 + "@babel/preset-env": ^7.14.7 "@babel/template": ^7.14.5 "@babel/types": ^7.14.5 "@carbon/scss-generator": ^10.13.0 + "@rollup/plugin-babel": ^5.3.0 + "@rollup/plugin-node-resolve": ^13.0.0 change-case: ^4.1.2 fs-extra: ^9.0.1 js-yaml: ^3.14.0 @@ -4662,6 +4666,22 @@ __metadata: languageName: node linkType: hard +"@rollup/plugin-node-resolve@npm:^13.0.0": + version: 13.0.0 + resolution: "@rollup/plugin-node-resolve@npm:13.0.0" + dependencies: + "@rollup/pluginutils": ^3.1.0 + "@types/resolve": 1.17.1 + builtin-modules: ^3.1.0 + deepmerge: ^4.2.2 + is-module: ^1.0.0 + resolve: ^1.19.0 + peerDependencies: + rollup: ^2.42.0 + checksum: c0237e65f50d593efc176e07a2ddf734918bc7344f739fe2254a3bfaa4be37c6d4787d045ab79d741811d3658f7e8bbb1484e6aa25bbb9fe2a3c33472b3f371d + languageName: node + linkType: hard + "@rollup/plugin-replace@npm:^2.4.2": version: 2.4.2 resolution: "@rollup/plugin-replace@npm:2.4.2"