|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports.default = void 0;
|
|---|
| 7 | var _helperPluginUtils = require("@babel/helper-plugin-utils");
|
|---|
| 8 | var _default = exports.default = (0, _helperPluginUtils.declare)(api => {
|
|---|
| 9 | api.assertVersion("^7.0.0-0 || ^8.0.0-0");
|
|---|
| 10 | const isPlugin = (plugin, name) => name === "plugin" || Array.isArray(plugin) && plugin[0] === "plugin";
|
|---|
| 11 | const options = plugin => Array.isArray(plugin) && plugin.length > 1 ? plugin[1] : {};
|
|---|
| 12 | return {
|
|---|
| 13 | name: "syntax-import-assertions",
|
|---|
| 14 | manipulateOptions(opts, {
|
|---|
| 15 | plugins
|
|---|
| 16 | }) {
|
|---|
| 17 | for (let i = 0; i < plugins.length; i++) {
|
|---|
| 18 | const plugin = plugins[i];
|
|---|
| 19 | if (isPlugin(plugin, "deprecatedImportAssert")) return;
|
|---|
| 20 | if (isPlugin(plugin, "importAttributes")) {
|
|---|
| 21 | plugins.splice(i, 1, "deprecatedImportAssert", ["importAttributes", Object.assign({}, options(plugin), {
|
|---|
| 22 | deprecatedAssertSyntax: true
|
|---|
| 23 | })]);
|
|---|
| 24 | return;
|
|---|
| 25 | }
|
|---|
| 26 | }
|
|---|
| 27 | plugins.push("importAssertions");
|
|---|
| 28 | }
|
|---|
| 29 | };
|
|---|
| 30 | });
|
|---|
| 31 |
|
|---|
| 32 | //# sourceMappingURL=index.js.map
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.