當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript config-css.config-css函數代碼示例

本文整理匯總了TypeScript中@easy-webpack/config-css.config-css函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript config-css函數的具體用法?TypeScript config-css怎麽用?TypeScript config-css使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了config-css函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: envDev

  /**
   * Don't be afraid, you can put bits of standard Webpack configuration here
   * (or at the end, after the last parameter, so it won't get overwritten by the presets)
   * Because that's all easy-webpack configs are - snippets of premade, maintained configuration parts!
   * 
   * For Webpack docs, see: https://webpack.js.org/configuration/
   */

  ENV === 'test' || ENV === 'development' ? 
    envDev(ENV !== 'test' ? {} : {devtool: 'inline-source-map'}) :
    envProd({ /* devtool: '...' */ }),

  aurelia({root: rootDir, src: srcDir, title: title, baseUrl: baseUrl}),
  typescript(ENV !== 'test' ? {} : { options: { doTypeCheck: false, sourceMap: false, inlineSourceMap: true, inlineSources: true } }),
  html(),
  css({ filename: 'styles.css', allChunks: true, sourceMap: false }),
  fontAndImages(),
  globalBluebird(),
  generateIndexHtml({minify: ENV === 'production'}),

  ...(ENV === 'production' || ENV === 'development' ? [
      commonChunksOptimize({appChunkName: 'app', firstChunk: 'aurelia-bootstrap'}),
      copyFiles({patterns: [{ from: 'favicon.ico', to: 'favicon.ico' }]})
    ] : [
    /* ENV === 'test' */
    generateCoverage({ options: { esModules: true } })
  ]),

  ENV === 'production' ?
    uglify({debug: false, mangle: { except: ['cb', '__webpack_require__'] }}) : {}
);
開發者ID:brimes,項目名稱:material-components-web,代碼行數:31,代碼來源:webpack.config.ts

示例2: easyCss

export = function less({ filename = '[name].css', allChunks = false, sourceMap = false, extractText = undefined, resolveRelativeUrl = undefined, additionalLoaders = [] } = {}) {
  additionalLoaders.push(`less-loader${sourceMap ? '?sourceMap' : ''}`)
  return easyCss({ test: /\.less$/i, filename, allChunks, extractText, resolveRelativeUrl, sourceMap, additionalLoaders })
}
開發者ID:easy-webpack,項目名稱:config-less,代碼行數:4,代碼來源:index.ts


注:本文中的@easy-webpack/config-css.config-css函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。