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

如何通过webpack配置去掉view文件中存在的一堆css样式代码 #83

Open
ImPigerla opened this issue Dec 9, 2020 · 0 comments

Comments

@ImPigerla
Copy link

ImPigerla commented Dec 9, 2020

举例

在SSR项目中,build出来的view文件内,存在一堆css样式代码,完整代码如下,css代码见中间部分:

!function(n,e){for(var t in e)n[t]=e[t]}(exports,function(n){var e={};function t(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var a in n)t.d(i,a,function(e){return n[e]}.bind(null,a));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="https://res.jscssfunny.com/fe/appcreator/public/",t(t.s=39)}([function(n,e){n.exports=require("react")},function(n,e){n.exports=require("tslib")},function(n,e,t){"use strict";n.exports=function(n){var e=[];return e.toString=function(){return this.map((function(e){var t=function(n,e){var t=n[1]||"",i=n[3];if(!i)return t;if(e&&"function"==typeof btoa){var a=(r=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=i.sources.map((function(n){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(n," */")}));return[t].concat(o).concat([a]).join("\n")}var r,s,l;return[t].join("\n")}(e,n);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t})).join("")},e.i=function(n,t,i){"string"==typeof n&&(n=[[null,n,""]]);var a={};if(i)for(var o=0;o<this.length;o++){var r=this[o][0];null!=r&&(a[r]=!0)}for(var s=0;s<n.length;s++){var l=[].concat(n[s]);i&&a[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),e.push(l))}},e}},function(n,e,t){"use strict"; /*! Isomorphic Style Loader | MIT License | https://github.com/kriasoft/isomorphic-style-loader */var i={};function a(n){n.forEach((function(n){if(--i[n]<=0){var e=document.getElementById(n);e&&e.parentNode.removeChild(e)}}))}n.exports=function(n,e){for(var t,o=void 0===e?{}:e,r=o.replace,s=void 0!==r&&r,l=o.prepend,m=void 0!==l&&l,c=o.prefix,d=void 0===c?"s":c,u=[],p=0;p<n.length;p++){var b=n[p],f=b[0],g=b[1],h=b[2],w=b[3],y=""+d+f+"-"+p;if(u.push(y),!i[y]||s){i[y]=1;var k=document.getElementById(y),v=!1;k||(v=!0,(k=document.createElement("style")).setAttribute("type","text/css"),k.id=y,h&&k.setAttribute("media",h));var x=g;w&&"function"==typeof btoa&&(x+="\n/*# sourceMappingURL=data:application/json;base64,"+(t=JSON.stringify(w),btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(n,e){return String.fromCharCode("0x"+e)})))+"*/"),x+="\n/*# sourceURL="+w.file+"?"+y+"*/"),"textContent"in k?k.textContent=x:k.styleSheet.cssText=x,v&&(m?document.head.insertBefore(k,document.head.childNodes[0]):document.head.appendChild(k))}else i[y]++}return a.bind(null,u)}},function(n,e){n.exports=require("request")},,function(n,e,t){"use strict";t.d(e,"a",(function(){return a}));var i=t(0),a=t.n(i).a.createContext({rootPath:""})},function(n,e){n.exports=require("antd-mobile/lib/button")},function(n,e){n.exports=require("react-dom")},function(n,e,t){"use strict";var i=t(1),a=t(0),o=t.n(a);t(8);function r(n){var e=n.ctx,t=n.query,i=n.children,a=n.appData,r=(n.device,n.env),s=n.title,l=void 0===s?"ssr-base":s,m=n.keywords,c=void 0===m?"ssr":m,d=n.description,u=void 0===d?"ssr-base":d,p=n.layout,b=void 0===p?{}:p,f=t&&t.hasOwnProperty("debug"),g=a&&a.data.gaid||"UA-175820453-1",h="local"===r?"":"https://res.jscssfunny.com/fe/appcreator",w=b.headBottom,y=b.bodyHead,k=b.bodyMiddle,v=b.bodyBottom,x=b.favicon,z=b.ga,E=e.origin+e.url;return o.a.createElement("html",{lang:"en"},o.a.createElement("head",null,o.a.createElement("title",null,l),o.a.createElement("meta",{charSet:"utf-8"}),o.a.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"}),o.a.createElement("meta",{name:"keywords",content:c}),o.a.createElement("meta",{name:"description",content:u}),o.a.createElement("meta",{name:"GAID",content:g}),o.a.createElement("link",{rel:"canonical",href:E}),x||o.a.createElement("link",{rel:"shortcut icon",href:"/favicon.png",type:"image/x-icon"}),o.a.createElement("meta",{property:"og:title",content:l}),o.a.createElement("meta",{property:"og:site_name",content:l}),o.a.createElement("meta",{property:"og:type",content:"website"}),o.a.createElement("meta",{property:"og:description",content:u}),w),o.a.createElement("body",null,y,o.a.createElement("main",{id:"app"},i),k,o.a.createElement("script",{src:"https://polyfill.io/v3/polyfill.min.js?features=es2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces6%2Ces7|gated&flags=gated&unknown=polyfill&callback=onPolyfillsLoad"}),null===z?null:z||o.a.createElement(o.a.Fragment,null,o.a.createElement("script",{async:!0,src:"https://www.googletagmanager.com/gtag/js?"+g}),o.a.createElement("script",{src:h+"/public/lib/ga-init.js?"+g})),"prod"===r&&o.a.createElement(o.a.Fragment,null,o.a.createElement("script",{src:h+"/public/lib/debug-console.js"}),f?o.a.createElement("script",null,"debugConsole(true)"):o.a.createElement("script",null,"debugConsole(false)")),f&&o.a.createElement(o.a.Fragment,null,o.a.createElement("script",{src:h+"/public/lib/vconsole.min.js"}),o.a.createElement("script",null,"var vConsole = new VConsole();")),v))}var s=t(6);e.a=function(n){var e=this;function t(e){var t=Object(i.__assign)({},e);return o.a.createElement(s.a.Provider,{value:t},o.a.createElement(n,e))}function a(e){var i=n.layout||{},a=Object.assign({},i,e);return o.a.createElement(r,a,o.a.createElement(t,e))}return n.asyncData&&(a.asyncData=function(t){return Object(i.__awaiter)(e,void 0,void 0,(function(){return Object(i.__generator)(this,(function(e){return[2,n.asyncData(t)]}))}))}),a}},function(n,e,t){"use strict";t(12),t(14)},function(n,e,t){"use strict";t(10),t(16),t(19)},function(n,e,t){var i=t(13),a=t(3),o="string"==typeof i?[[n.i,i,""]]:i;(e=n.exports=i.locals||{})._getContent=function(){return o},e._getCss=function(){return""+i},e._insertCss=function(n){return a(o,n)}},function(n,e,t){(e=t(2)(!1)).push([n.i,'/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in\n * IE on Windows Phone and in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers (opinionated).\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Add the correct display in IE 9-.\n */\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\n/**\n * Correct the font size and margin onh1elements withinsectionand\n *articlecontexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n * 1. Add the correct display in IE.\n */\n\nfigcaption,\nfigure,\nmain { /* 1 */\n display: block;\n}\n\n/**\n * Add the correct margin in IE 8.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the oddemfont sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * 1. Remove the gray background on active links in IE 10.\n * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.\n */\n\na {\n background-color: transparent; /* 1 */\n -webkit-text-decoration-skip: objects; /* 2 */\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57- and Firefox 39-.\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Prevent the duplicate application ofbolderby the next rule in Safari 6.\n */\n\nb,\nstrong {\n font-weight: inherit;\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the oddemfont sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font style in Android 4.3-.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Add the correct background and color in IE 9-.\n */\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Preventsubandsupelements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\naudio,\nvideo {\n display: inline-block;\n}\n\n/**\n * Add the correct display in iOS 4-7.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Remove the border on images inside links in IE 10-.\n */\n\nimg {\n border-style: none;\n}\n\n/**\n * Hide the overflow in IE.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers (opinionated).\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: sans-serif; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * 1. Prevent a WebKit bug where (2) destroys nativeaudioandvideo\n * controls in Android 4.\n * 2. Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\nhtml [type="button"], /* 1 */\n[type="reset"],\n[type="submit"] {\n -webkit-appearance: button; /* 2 */\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type="button"]::-moz-focus-inner,\n[type="reset"]::-moz-focus-inner,\n[type="submit"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type="button"]:-moz-focusring,\n[type="reset"]:-moz-focusring,\n[type="submit"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from fieldsetelements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * fieldsetelements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * 1. Add the correct display in IE 9-.\n * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Remove the default vertical scrollbar in IE.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10-.\n * 2. Remove the padding in IE 10-.\n */\n\n[type="checkbox"],\n[type="radio"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type="number"]::-webkit-inner-spin-button,\n[type="number"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type="search"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.\n */\n\n[type="search"]::-webkit-search-cancel-button,\n[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties toinheritin Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in IE 9-.\n * 1. Add the correct display in Edge, IE, and Firefox.\n */\n\ndetails, /* 1 */\nmenu {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Scripting\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\ncanvas {\n display: inline-block;\n}\n\n/**\n * Add the correct display in IE.\n */\n\ntemplate {\n display: none;\n}\n\n/* Hidden\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10-.\n */\n\n[hidden] {\n display: none;\n}\n',""]),n.exports=e},function(n,e,t){var i=t(15),a=t(3),o="string"==typeof i?[[n.i,i,""]]:i;(e=n.exports=i.locals||{})._getContent=function(){return o},e._getCss=function(){return""+i},e._insertCss=function(n){return a(o,n)}},function(n,e,t){(e=t(2)(!1)).push([n.i,"/*do not import this file except components/style/index.less*/\n.am-fade-enter,\n.am-fade-appear {\n opacity: 0;\n -webkit-animation-duration: .2s;\n animation-duration: .2s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.am-fade-leave {\n -webkit-animation-duration: .2s;\n animation-duration: .2s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.am-fade-enter.am-fade-enter-active,\n.am-fade-appear.am-fade-appear-active {\n -webkit-animation-name: amFadeIn;\n animation-name: amFadeIn;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n.am-fade-leave.am-fade-leave-active {\n -webkit-animation-name: amFadeOut;\n animation-name: amFadeOut;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n@-webkit-keyframes amFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes amFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@-webkit-keyframes amFadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n@keyframes amFadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n.am-slide-up-enter,\n.am-slide-up-appear {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n.am-slide-up-enter,\n.am-slide-up-appear,\n.am-slide-up-leave {\n -webkit-animation-duration: .2s;\n animation-duration: .2s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.am-slide-up-enter.am-slide-up-enter-active,\n.am-slide-up-appear.am-slide-up-appear-active {\n -webkit-animation-name: amSlideUpIn;\n animation-name: amSlideUpIn;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n.am-slide-up-leave.am-slide-up-leave-active {\n -webkit-animation-name: amSlideUpOut;\n animation-name: amSlideUpOut;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n@-webkit-keyframes amSlideUpIn {\n 0% {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n }\n 100% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n}\n@keyframes amSlideUpIn {\n 0% {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n }\n 100% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n}\n@-webkit-keyframes amSlideUpOut {\n 0% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n 100% {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n }\n}\n@keyframes amSlideUpOut {\n 0% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n 100% {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n }\n}\n.am.am-zoom-enter,\n.am.am-zoom-leave {\n display: block;\n}\n.am-zoom-enter,\n.am-zoom-appear {\n opacity: 0;\n -webkit-animation-duration: .2s;\n animation-duration: .2s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n -webkit-animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28);\n animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28);\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.am-zoom-leave {\n -webkit-animation-duration: .2s;\n animation-duration: .2s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n -webkit-animation-timing-function: cubic-bezier(0.6, -0.3, 0.74, 0.05);\n animation-timing-function: cubic-bezier(0.6, -0.3, 0.74, 0.05);\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.am-zoom-enter.am-zoom-enter-active,\n.am-zoom-appear.am-zoom-appear-active {\n -webkit-animation-name: amZoomIn;\n animation-name: amZoomIn;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n.am-zoom-leave.am-zoom-leave-active {\n -webkit-animation-name: amZoomOut;\n animation-name: amZoomOut;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n@-webkit-keyframes amZoomIn {\n 0% {\n opacity: 0;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(0, 0);\n transform: scale(0, 0);\n }\n 100% {\n opacity: 1;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(1, 1);\n transform: scale(1, 1);\n }\n}\n@keyframes amZoomIn {\n 0% {\n opacity: 0;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(0, 0);\n transform: scale(0, 0);\n }\n 100% {\n opacity: 1;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(1, 1);\n transform: scale(1, 1);\n }\n}\n@-webkit-keyframes amZoomOut {\n 0% {\n opacity: 1;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(1, 1);\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(0, 0);\n transform: scale(0, 0);\n }\n}\n@keyframes amZoomOut {\n 0% {\n opacity: 1;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(1, 1);\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n -webkit-transform: scale(0, 0);\n transform: scale(0, 0);\n }\n}\n.am-slide-down-enter,\n.am-slide-down-appear {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n.am-slide-down-enter,\n.am-slide-down-appear,\n.am-slide-down-leave {\n -webkit-animation-duration: .2s;\n animation-duration: .2s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.am-slide-down-enter.am-slide-down-enter-active,\n.am-slide-down-appear.am-slide-down-appear-active {\n -webkit-animation-name: amSlideDownIn;\n animation-name: amSlideDownIn;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n.am-slide-down-leave.am-slide-down-leave-active {\n -webkit-animation-name: amSlideDownOut;\n animation-name: amSlideDownOut;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n@-webkit-keyframes amSlideDownIn {\n 0% {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n }\n 100% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n}\n@keyframes amSlideDownIn {\n 0% {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n }\n 100% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n}\n@-webkit-keyframes amSlideDownOut {\n 0% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n 100% {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n }\n}\n@keyframes amSlideDownOut {\n 0% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n 100% {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n }\n}\n*,\n*:before,\n*:after {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n background-color: #f5f5f9;\n font-size: 14px;\n}\n*[contenteditable] {\n -webkit-user-select: auto !important;\n}\n*:focus {\n outline: none;\n}\na {\n background: transparent;\n text-decoration: none;\n outline: none;\n}\n",""]),n.exports=e},function(n,e,t){"use strict";t(17)},function(n,e,t){var i=t(18),a=t(3),o="string"==typeof i?[[n.i,i,""]]:i;(e=n.exports=i.locals||{})._getContent=function(){return o},e._getCss=function(){return""+i},e._insertCss=function(n){return a(o,n)}},function(n,e,t){(e=t(2)(!1)).push([n.i,".am-icon {\n fill: currentColor;\n background-size: cover;\n width: 22px;\n height: 22px;\n}\n.am-icon-xxs {\n width: 15px;\n height: 15px;\n}\n.am-icon-xs {\n width: 18px;\n height: 18px;\n}\n.am-icon-sm {\n width: 21px;\n height: 21px;\n}\n.am-icon-md {\n width: 22px;\n height: 22px;\n}\n.am-icon-lg {\n width: 36px;\n height: 36px;\n}\n.am-icon-loading {\n -webkit-animation: cirle-anim 1s linear infinite;\n animation: cirle-anim 1s linear infinite;\n}\n@-webkit-keyframes cirle-anim {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes cirle-anim {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",""]),n.exports=e},function(n,e,t){var i=t(20),a=t(3),o="string"==typeof i?[[n.i,i,""]]:i;(e=n.exports=i.locals||{})._getContent=function(){return o},e._getCss=function(){return""+i},e._insertCss=function(n){return a(o,n)}},function(n,e,t){(e=t(2)(!1)).push([n.i,".am-button {\n display: block;\n outline: 0 none;\n -webkit-appearance: none;\n box-sizing: border-box;\n padding: 0;\n text-align: center;\n font-size: 18px;\n height: 47px;\n line-height: 47px;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n white-space: nowrap;\n color: #000;\n background-color: #fff;\n border: 1PX solid #ddd;\n border-radius: 5px;\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n html:not([data-scale]) .am-button {\n position: relative;\n border: none;\n }\n html:not([data-scale]) .am-button::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 200%;\n height: 200%;\n border: 1PX solid #ddd;\n border-radius: 10px;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n box-sizing: border-box;\n pointer-events: none;\n }\n}\n.am-button-borderfix:before {\n -webkit-transform: scale(0.49) !important;\n transform: scale(0.49) !important;\n}\n.am-button.am-button-active {\n background-color: #ddd;\n}\n.am-button.am-button-disabled {\n color: rgba(0, 0, 0, 0.3);\n opacity: 0.6;\n}\n.am-button-primary {\n color: #fff;\n background-color: #108ee9;\n border: 1PX solid #108ee9;\n border-radius: 5px;\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n html:not([data-scale]) .am-button-primary {\n position: relative;\n border: none;\n }\n html:not([data-scale]) .am-button-primary::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 200%;\n height: 200%;\n border: 1PX solid #108ee9;\n border-radius: 10px;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n box-sizing: border-box;\n pointer-events: none;\n }\n}\n.am-button-primary.am-button-active {\n color: rgba(255, 255, 255, 0.3);\n background-color: #0e80d2;\n}\n.am-button-primary.am-button-disabled {\n color: rgba(255, 255, 255, 0.6);\n opacity: 0.4;\n}\n.am-button-ghost {\n color: #108ee9;\n background-color: transparent;\n border: 1PX solid #108ee9;\n border-radius: 5px;\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n html:not([data-scale]) .am-button-ghost {\n position: relative;\n border: none;\n }\n html:not([data-scale]) .am-button-ghost::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 200%;\n height: 200%;\n border: 1PX solid #108ee9;\n border-radius: 10px;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n box-sizing: border-box;\n pointer-events: none;\n }\n}\n.am-button-ghost.am-button-active {\n color: rgba(16, 142, 233, 0.6);\n background-color: transparent;\n border: 1PX solid rgba(16, 142, 233, 0.6);\n border-radius: 5px;\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n html:not([data-scale]) .am-button-ghost.am-button-active {\n position: relative;\n border: none;\n }\n html:not([data-scale]) .am-button-ghost.am-button-active::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 200%;\n height: 200%;\n border: 1PX solid rgba(16, 142, 233, 0.6);\n border-radius: 10px;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n box-sizing: border-box;\n pointer-events: none;\n }\n}\n.am-button-ghost.am-button-disabled {\n color: rgba(0, 0, 0, 0.1);\n border: 1PX solid rgba(0, 0, 0, 0.1);\n border-radius: 5px;\n opacity: 1;\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n html:not([data-scale]) .am-button-ghost.am-button-disabled {\n position: relative;\n border: none;\n }\n html:not([data-scale]) .am-button-ghost.am-button-disabled::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 200%;\n height: 200%;\n border: 1PX solid rgba(0, 0, 0, 0.1);\n border-radius: 10px;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n box-sizing: border-box;\n pointer-events: none;\n }\n}\n.am-button-warning {\n color: #fff;\n background-color: #e94f4f;\n}\n.am-button-warning.am-button-active {\n color: rgba(255, 255, 255, 0.3);\n background-color: #d24747;\n}\n.am-button-warning.am-button-disabled {\n color: rgba(255, 255, 255, 0.6);\n opacity: 0.4;\n}\n.am-button-inline {\n display: inline-block;\n padding: 0 15px;\n}\n.am-button-inline.am-button-icon {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: inline-flex;\n}\n.am-button-small {\n font-size: 13px;\n height: 30px;\n line-height: 30px;\n padding: 0 15px;\n}\n.am-button-icon {\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.am-button > .am-button-icon {\n margin-right: 0.5em;\n}\n",""]),n.exports=e},,,function(n,e,t){n.exports=t.p+"img/favicon.71983017.png"},function(n,e,t){var i=t(25),a=t(3),o="string"==typeof i?[[n.i,i,""]]:i;(e=n.exports=i.locals||{})._getContent=function(){return o},e._getCss=function(){return""+i},e._insertCss=function(n){return a(o,n)}},function(n,e,t){(e=t(2)(!1)).push([n.i,"article,\naside,\nblockquote,\nbody,\nbutton,\ncode,\ndd,\ndetails,\ndiv,\ndl,\ndt,\nfieldset,\nfigcaption,\nfigure,\nfooter,\nform,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nheader,\nhr,\niframe,\ninput,\nlegend,\nli,\nmenu,\nnav,\nol,\np,\npre,\nsection,\ntd,\ntextarea,\nth,\nul {\n margin: 0;\n padding: 0;\n}\n\n* {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\nbody,\nbutton,\ninput,\nselect,\ntextarea {\n font-size: 0.12rem;\n line-height: 1.5;\n font-family: system, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', 'Microsoft YaHei', 'wenquanyi micro hei', 'Hiragino Sans GB', 'Hiragino Sans GB W3', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n}\n\nfieldset,\nimg {\n border: 0;\n}\n\nimg {\n max-width: 100%;\n vertical-align: middle;\n}\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n outline: 0;\n padding: 0;\n margin: 0;\n border: none;\n background: transparent;\n -webkit-appearance: none;\n}\n\ntextarea {\n resize: none;\n overflow: auto;\n}\n\na:active,\na:hover,\na:link,\na:visited {\n text-decoration: none;\n}\n\nem,\ni {\n font-style: normal;\n}\n\nol,\nul {\n list-style: none;\n}\n\n.clearfix::after {\n content: '';\n display: block;\n clear: both;\n}\n\n.pull-right {\n float: right !important;\n}\n\n.pull-left {\n float: left !important;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mt-5 {\n margin-top: 0.05rem;\n}\n\n.mr-5 {\n margin-right: 0.05rem;\n}\n\n.mb-5 {\n margin-bottom: 0.05rem;\n}\n\n.ml-5 {\n margin-left: 0.05rem;\n}\n\n.pt-5 {\n padding-top: 0.05rem;\n}\n\n.pr-5 {\n padding-right: 0.05rem;\n}\n\n.pb-5 {\n padding-bottom: 0.05rem;\n}\n\n.pl-5 {\n padding-left: 0.05rem;\n}\n\n.mt-10 {\n margin-top: 0.1rem;\n}\n\n.mr-10 {\n margin-right: 0.1rem;\n}\n\n.mb-10 {\n margin-bottom: 0.1rem;\n}\n\n.ml-10 {\n margin-left: 0.1rem;\n}\n\n.pt-10 {\n padding-top: 0.1rem;\n}\n\n.pr-10 {\n padding-right: 0.1rem;\n}\n\n.pb-10 {\n padding-bottom: 0.1rem;\n}\n\n.pl-10 {\n padding-left: 0.1rem;\n}\n\n.mt-15 {\n margin-top: 0.15rem;\n}\n\n.mr-15 {\n margin-right: 0.15rem;\n}\n\n.mb-15 {\n margin-bottom: 0.15rem;\n}\n\n.ml-15 {\n margin-left: 0.15rem;\n}\n\n.pt-15 {\n padding-top: 0.15rem;\n}\n\n.pr-15 {\n padding-right: 0.15rem;\n}\n\n.pb-15 {\n padding-bottom: 0.15rem;\n}\n\n.pl-15 {\n padding-left: 0.15rem;\n}\n\n.mt-20 {\n margin-top: 0.2rem;\n}\n\n.mr-20 {\n margin-right: 0.2rem;\n}\n\n.mb-20 {\n margin-bottom: 0.2rem;\n}\n\n.ml-20 {\n margin-left: 0.2rem;\n}\n\n.pt-20 {\n padding-top: 0.2rem;\n}\n\n.pr-20 {\n padding-right: 0.2rem;\n}\n\n.pb-20 {\n padding-bottom: 0.2rem;\n}\n\n.pl-20 {\n padding-left: 0.2rem;\n}\n\nhtml {\n font-size: 13.33333vw;\n}\n\n@media screen and (min-width: 750px) {\n html {\n font-size: 100px;\n }\n}\n\nbody {\n height: 100%;\n max-width: 7.5rem;\n margin: 0 auto;\n}\n\n@media screen and (max-width: 750px) {\n body {\n min-width: 100vw;\n }\n}\n\n#app {\n min-height: 100vh;\n}\n\n.title {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n color: blue;\n font-size: 0.3rem;\n}",""]),n.exports=e},,,,,,,,,,,,,,function(n,e,t){"use strict";t.r(e);t(11);var i=t(7),a=t.n(i),o=t(1),r=t(0),s=t.n(r),l=t(9),m=t(4),c=t.n(m);t(24);function d(n){try{window.gaEvent("mobile","[mobile]enter_page")}catch(n){}return Object(r.useEffect)((function(){window.gaEvent("mobile","[mobile]page_loaded"),c.a.get("/demo",null,{"X-showMessage":!0}).then((function(n){console.log(n)})),c.a.post("/demo",{c:1},{ee:2,params:{dd:2}}).then((function(n){console.log(n)}))}),[]),s.a.createElement("div",null,s.a.createElement("h1",{className:"title"},"我是子页面"),s.a.createElement(a.a,null,"我是子页面"))}d.asyncData=function(n){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var n;return Object(o.__generator)(this,(function(e){switch(e.label){case 0:return[4,Object(o.__awaiter)(void 0,void 0,void 0,(function(){return Object(o.__generator)(this,(function(n){return[2,{layout:{favicon:s.a.createElement("link",{rel:"shortcut icon",href:t(23),type:"image/x-icon"})}}]}))}))];case 1:return n=e.sent(),[2,Object(o.__assign)({title:"test",keywords:"test,test,test",description:"a test page"},n)]}}))}))};e.default=Object(l.a)(d)}]));

问题是

如何通过webpack配置,达到去掉css代码的效果?

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

1 participant