本文整理汇总了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__'] }}) : {}
);
示例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 })
}