Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript: Adaptive Card should not assume css-loader/webpack is available on the build pipeline of the host project #2279

Closed
compulim opened this issue Jan 8, 2019 · 1 comment
Assignees

Comments

@compulim
Copy link
Contributor

compulim commented Jan 8, 2019

Platform

What platform is your issue or question related to? (Delete other platforms).

  • JavaScript

Author or host

Host

Version of SDK

1.1.2

Issue

In lib/adaptivecards.js, it read

"use strict";
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./card-elements"));
__export(require("./enums"));
__export(require("./host-config"));
var utils_1 = require("./utils");
exports.SizeAndUnit = utils_1.SizeAndUnit;
exports.getEnumValueOrDefault = utils_1.getEnumValueOrDefault;
require("./adaptivecards-default.css");
//# sourceMappingURL=adaptivecards.js.map

On the very last line, require("./adaptivecards-default.css");, it assume the build pipeline of the project that include Adaptive Cards is on Webpack and have css-loader and style-loader installed.

This will prohibit the use of Adaptive Cards on projects that use rollup.js or other bundling engines that does not support loading CSS in JavaScript.

@compulim compulim changed the title Node.js: Adaptive Card should not assume css-loader/webpack is available on the build pipeline of the host project JavaScript: Adaptive Card should not assume css-loader/webpack is available on the build pipeline of the host project Jan 8, 2019
@matthidinger
Copy link
Member

Thanks for reporting @compulim, I will hopefully have this resolved this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants