Initial boiler plate project
This commit is contained in:
36
node_modules/next/dist/build/babel/plugins/amp-attributes.js
generated
vendored
Normal file
36
node_modules/next/dist/build/babel/plugins/amp-attributes.js
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return AmpAttributePatcher;
|
||||
}
|
||||
});
|
||||
function AmpAttributePatcher() {
|
||||
return {
|
||||
visitor: {
|
||||
JSXOpeningElement (path) {
|
||||
const openingElement = path.node;
|
||||
const { name, attributes } = openingElement;
|
||||
if (!(name && name.type === "JSXIdentifier")) {
|
||||
return;
|
||||
}
|
||||
if (!name.name.startsWith("amp-")) {
|
||||
return;
|
||||
}
|
||||
for (const attribute of attributes){
|
||||
if (attribute.type !== "JSXAttribute") {
|
||||
continue;
|
||||
}
|
||||
if (attribute.name.name === "className") {
|
||||
attribute.name.name = "class";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=amp-attributes.js.map
|
||||
Reference in New Issue
Block a user