Fixes #3329 - Tweak webpack config to share CSS loaders for production builders. Updated production builds to use ExtractTextPlugin so styles are not built into JS.
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
var path = require('path')
|
var path = require("path")
|
||||||
|
|
||||||
var webpack = require('webpack')
|
var webpack = require("webpack")
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
var ExtractTextPlugin = require("extract-text-webpack-plugin")
|
||||||
var deepExtend = require('deep-extend')
|
var deepExtend = require("deep-extend")
|
||||||
const {gitDescribeSync} = require('git-describe');
|
const {gitDescribeSync} = require("git-describe")
|
||||||
|
|
||||||
var pkg = require('./package.json')
|
var pkg = require("./package.json")
|
||||||
|
|
||||||
let gitInfo
|
let gitInfo
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ try {
|
|||||||
gitInfo = gitDescribeSync(__dirname)
|
gitInfo = gitDescribeSync(__dirname)
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
gitInfo = {
|
gitInfo = {
|
||||||
hash: 'noGit',
|
hash: "noGit",
|
||||||
dirty: false
|
dirty: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,21 +21,21 @@ try {
|
|||||||
var commonRules = [
|
var commonRules = [
|
||||||
{ test: /\.(js(x)?)(\?.*)?$/,
|
{ test: /\.(js(x)?)(\?.*)?$/,
|
||||||
use: [{
|
use: [{
|
||||||
loader: 'babel-loader',
|
loader: "babel-loader",
|
||||||
options: {
|
options: {
|
||||||
retainLines: true
|
retainLines: true
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
include: [ path.join(__dirname, 'src') ]
|
include: [ path.join(__dirname, "src") ]
|
||||||
},
|
},
|
||||||
{ test: /\.(txt|yaml)(\?.*)?$/,
|
{ test: /\.(txt|yaml)(\?.*)?$/,
|
||||||
loader: 'raw-loader' },
|
loader: "raw-loader" },
|
||||||
{ test: /\.(png|jpg|jpeg|gif|svg)(\?.*)?$/,
|
{ test: /\.(png|jpg|jpeg|gif|svg)(\?.*)?$/,
|
||||||
loader: 'url-loader?limit=10000' },
|
loader: "url-loader?limit=10000" },
|
||||||
{ test: /\.(woff|woff2)(\?.*)?$/,
|
{ test: /\.(woff|woff2)(\?.*)?$/,
|
||||||
loader: 'url-loader?limit=100000' },
|
loader: "url-loader?limit=100000" },
|
||||||
{ test: /\.(ttf|eot)(\?.*)?$/,
|
{ test: /\.(ttf|eot)(\?.*)?$/,
|
||||||
loader: 'file-loader' }
|
loader: "file-loader" }
|
||||||
]
|
]
|
||||||
|
|
||||||
module.exports = function(rules, options) {
|
module.exports = function(rules, options) {
|
||||||
@@ -54,13 +54,12 @@ module.exports = function(rules, options) {
|
|||||||
|
|
||||||
if( specialOptions.separateStylesheets ) {
|
if( specialOptions.separateStylesheets ) {
|
||||||
plugins.push(new ExtractTextPlugin({
|
plugins.push(new ExtractTextPlugin({
|
||||||
filename: '[name].css' + (specialOptions.longTermCaching ? '?[contenthash]' : ''),
|
filename: "[name].css" + (specialOptions.longTermCaching ? "?[contenthash]" : ""),
|
||||||
allChunks: true
|
allChunks: true
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if( specialOptions.minimize ) {
|
if( specialOptions.minimize ) {
|
||||||
|
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
@@ -78,12 +77,11 @@ module.exports = function(rules, options) {
|
|||||||
|
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
"process.env": {
|
||||||
NODE_ENV: specialOptions.minimize ? JSON.stringify('production') : null,
|
NODE_ENV: specialOptions.minimize ? JSON.stringify("production") : null,
|
||||||
WEBPACK_INLINE_STYLES: !Boolean(specialOptions.separateStylesheets)
|
WEBPACK_INLINE_STYLES: !specialOptions.separateStylesheets
|
||||||
|
|
||||||
},
|
},
|
||||||
'buildInfo': JSON.stringify({
|
"buildInfo": JSON.stringify({
|
||||||
PACKAGE_VERSION: (pkg.version),
|
PACKAGE_VERSION: (pkg.version),
|
||||||
GIT_COMMIT: gitInfo.hash,
|
GIT_COMMIT: gitInfo.hash,
|
||||||
GIT_DIRTY: gitInfo.dirty
|
GIT_DIRTY: gitInfo.dirty
|
||||||
@@ -92,21 +90,21 @@ module.exports = function(rules, options) {
|
|||||||
|
|
||||||
delete options._special
|
delete options._special
|
||||||
|
|
||||||
var completeConfig = deepExtend({
|
var completeConfig = deepExtend({
|
||||||
entry: {},
|
entry: {},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist'),
|
path: path.join(__dirname, "dist"),
|
||||||
publicPath: '/',
|
publicPath: "/",
|
||||||
filename: '[name].js',
|
filename: "[name].js",
|
||||||
chunkFilename: '[name].js'
|
chunkFilename: "[name].js"
|
||||||
},
|
},
|
||||||
|
|
||||||
target: 'web',
|
target: "web",
|
||||||
|
|
||||||
// yaml-js has a reference to `fs`, this is a workaround
|
// yaml-js has a reference to `fs`, this is a workaround
|
||||||
node: {
|
node: {
|
||||||
fs: 'empty'
|
fs: "empty"
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
@@ -114,17 +112,17 @@ module.exports = function(rules, options) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
resolveLoader: {
|
resolveLoader: {
|
||||||
modules: [path.join(__dirname, 'node_modules')],
|
modules: [path.join(__dirname, "node_modules")],
|
||||||
},
|
},
|
||||||
|
|
||||||
externals: {
|
externals: {
|
||||||
'buffertools': true // json-react-schema/deeper depends on buffertools, which fails.
|
"buffertools": true // json-react-schema/deeper depends on buffertools, which fails.
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
modules: [
|
modules: [
|
||||||
path.join(__dirname, './src'),
|
path.join(__dirname, "./src"),
|
||||||
'node_modules'
|
"node_modules"
|
||||||
],
|
],
|
||||||
extensions: [".web.js", ".js", ".jsx", ".json", ".less"],
|
extensions: [".web.js", ".js", ".jsx", ".json", ".less"],
|
||||||
alias: {
|
alias: {
|
||||||
@@ -132,7 +130,7 @@ module.exports = function(rules, options) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
devtool: specialOptions.sourcemaps ? 'cheap-module-source-map' : null,
|
devtool: specialOptions.sourcemaps ? "cheap-module-source-map" : null,
|
||||||
|
|
||||||
plugins,
|
plugins,
|
||||||
|
|
||||||
|
|||||||
@@ -1,64 +1,33 @@
|
|||||||
var path = require('path')
|
const path = require("path")
|
||||||
var rules = [
|
const styleRules = require("./webpack.dist-style.config.js")
|
||||||
|
|
||||||
|
let rules = [
|
||||||
{ test: /\.(worker\.js)(\?.*)?$/,
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'worker-loader',
|
loader: "worker-loader",
|
||||||
options: {
|
options: {
|
||||||
inline: true,
|
inline: true,
|
||||||
name: '[name].js'
|
name: "[name].js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ loader: 'babel-loader' }
|
{ loader: "babel-loader" }
|
||||||
]
|
|
||||||
},
|
|
||||||
{ test: /\.(css)(\?.*)?$/,
|
|
||||||
use: [
|
|
||||||
'style-loader',
|
|
||||||
'css-loader',
|
|
||||||
'postcss-loader'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{ test: /\.(scss)(\?.*)?$/,
|
|
||||||
use: [
|
|
||||||
'style-loader',
|
|
||||||
'css-loader',
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
options: { sourceMap: true }
|
|
||||||
},
|
|
||||||
{ loader: 'sass-loader',
|
|
||||||
options: {
|
|
||||||
outputStyle: 'expanded',
|
|
||||||
sourceMap: true,
|
|
||||||
sourceMapContents: 'true'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{ test: /\.(less)(\?.*)?$/,
|
|
||||||
use: [
|
|
||||||
'style-loader',
|
|
||||||
'css-loader',
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
},
|
|
||||||
'less-loader'
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
rules = rules.concat(styleRules)
|
||||||
|
|
||||||
module.exports = require('./make-webpack-config.js')(rules, {
|
module.exports = require("./make-webpack-config.js")(rules, {
|
||||||
_special: {
|
_special: {
|
||||||
separateStylesheets: false,
|
separateStylesheets: true,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
sourcemaps: true,
|
sourcemaps: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
'swagger-ui-bundle': [
|
"swagger-ui-bundle": [
|
||||||
'./src/polyfills',
|
"./src/polyfills",
|
||||||
'./src/core/index.js'
|
"./src/core/index.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,65 +1,33 @@
|
|||||||
var path = require('path')
|
const path = require("path")
|
||||||
|
const styleRules = require("./webpack.dist-style.config.js")
|
||||||
|
|
||||||
var rules = [
|
let rules = [
|
||||||
{ test: /\.(worker\.js)(\?.*)?$/,
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'worker-loader',
|
loader: "worker-loader",
|
||||||
options: {
|
options: {
|
||||||
inline: true,
|
inline: true,
|
||||||
name: '[name].js'
|
name: "[name].js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ loader: 'babel-loader' }
|
{ loader: "babel-loader" }
|
||||||
]
|
|
||||||
},
|
|
||||||
{ test: /\.(css)(\?.*)?$/,
|
|
||||||
use: [
|
|
||||||
'style-loader',
|
|
||||||
'css-loader',
|
|
||||||
'postcss-loader'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{ test: /\.(scss)(\?.*)?$/,
|
|
||||||
use: [
|
|
||||||
'style-loader',
|
|
||||||
'css-loader',
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
options: { sourceMap: true }
|
|
||||||
},
|
|
||||||
{ loader: 'sass-loader',
|
|
||||||
options: {
|
|
||||||
outputStyle: 'expanded',
|
|
||||||
sourceMap: true,
|
|
||||||
sourceMapContents: 'true'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{ test: /\.(less)(\?.*)?$/,
|
|
||||||
use: [
|
|
||||||
'style-loader',
|
|
||||||
'css-loader',
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
},
|
|
||||||
'less-loader'
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
rules = rules.concat(styleRules)
|
||||||
|
|
||||||
module.exports = require('./make-webpack-config.js')(rules, {
|
module.exports = require("./make-webpack-config.js")(rules, {
|
||||||
_special: {
|
_special: {
|
||||||
separateStylesheets: false,
|
separateStylesheets: true,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
sourcemaps: true,
|
sourcemaps: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
'swagger-ui-standalone-preset': [
|
"swagger-ui-standalone-preset": [
|
||||||
'./src/polyfills',
|
"./src/polyfills",
|
||||||
'./src/standalone/index.js'
|
"./src/standalone/index.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,66 +1,25 @@
|
|||||||
var path = require('path')
|
const path = require("path")
|
||||||
var fs = require('fs')
|
const fs = require("fs")
|
||||||
const nodeModules = fs.readdirSync("node_modules").filter(function(x) { return x !== ".bin" })
|
const nodeModules = fs.readdirSync("node_modules").filter(function(x) { return x !== ".bin" })
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
const styleRules = require("./webpack.dist-style.config.js")
|
||||||
|
|
||||||
var rules = [
|
let rules = [
|
||||||
{ test: /\.(worker\.js)(\?.*)?$/,
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'worker-loader',
|
loader: "worker-loader",
|
||||||
options: {
|
options: {
|
||||||
inline: true,
|
inline: true,
|
||||||
name: '[name].js'
|
name: "[name].js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ loader: 'babel-loader' }
|
{ loader: "babel-loader" }
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{ test: /\.(css)(\?.*)?$/,
|
|
||||||
use: ExtractTextPlugin.extract({
|
|
||||||
fallback: 'style-loader',
|
|
||||||
use: [
|
|
||||||
'css-loader',
|
|
||||||
'postcss-loader'
|
|
||||||
]
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{ test: /\.(scss)(\?.*)?$/,
|
|
||||||
use: ExtractTextPlugin.extract({
|
|
||||||
fallback: 'style-loader',
|
|
||||||
use: [
|
|
||||||
{
|
|
||||||
loader: 'css-loader',
|
|
||||||
options: { minimize: true }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
options: { sourceMap: true }
|
|
||||||
},
|
|
||||||
{ loader: 'sass-loader',
|
|
||||||
options: {
|
|
||||||
outputStyle: 'expanded',
|
|
||||||
sourceMap: true,
|
|
||||||
sourceMapContents: 'true'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{ test: /\.(less)(\?.*)?$/,
|
|
||||||
use: ExtractTextPlugin.extract({
|
|
||||||
fallback: 'style-loader',
|
|
||||||
use: ['css-loader',
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
},
|
|
||||||
'less-loader'
|
|
||||||
]
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
rules = rules.concat(styleRules)
|
||||||
|
|
||||||
module.exports = require('./make-webpack-config.js')(rules, {
|
module.exports = require("./make-webpack-config.js")(rules, {
|
||||||
_special: {
|
_special: {
|
||||||
separateStylesheets: true,
|
separateStylesheets: true,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
|
|||||||
@@ -1,55 +1,55 @@
|
|||||||
var path = require('path')
|
const path = require("path")
|
||||||
|
|
||||||
var rules = [
|
const rules = [
|
||||||
{ test: /\.(worker\.js)(\?.*)?$/,
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'worker-loader',
|
loader: "worker-loader",
|
||||||
options: {
|
options: {
|
||||||
inline: true
|
inline: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ loader: 'babel-loader' }
|
{ loader: "babel-loader" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ test: /\.(jsx)(\?.*)?$/,
|
{ test: /\.(jsx)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
{ loader: 'react-hot-loader' },
|
{ loader: "react-hot-loader" },
|
||||||
{ loader: 'babel-loader' }
|
{ loader: "babel-loader" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ test: /\.(css)(\?.*)?$/,
|
{ test: /\.(css)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
'style-loader',
|
"style-loader",
|
||||||
'css-loader',
|
"css-loader",
|
||||||
'postcss-loader'
|
"postcss-loader"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ test: /\.(scss)(\?.*)?$/,
|
{ test: /\.(scss)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
'style-loader',
|
"style-loader",
|
||||||
'css-loader',
|
"css-loader",
|
||||||
{
|
{
|
||||||
loader: 'postcss-loader',
|
loader: "postcss-loader",
|
||||||
options: { sourceMap: true }
|
options: { sourceMap: true }
|
||||||
},
|
},
|
||||||
{ loader: 'sass-loader',
|
{ loader: "sass-loader",
|
||||||
options: {
|
options: {
|
||||||
outputStyle: 'expanded',
|
outputStyle: "expanded",
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
sourceMapContents: 'true'
|
sourceMapContents: "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ test: /\.(less)(\?.*)?$/,
|
{ test: /\.(less)(\?.*)?$/,
|
||||||
use: [
|
use: [
|
||||||
'style-loader',
|
"style-loader",
|
||||||
'css-loader',
|
"css-loader",
|
||||||
{
|
{
|
||||||
loader: 'postcss-loader',
|
loader: "postcss-loader",
|
||||||
},
|
},
|
||||||
'less-loader'
|
"less-loader"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -60,25 +60,25 @@ module.exports = require("./make-webpack-config")(rules, {
|
|||||||
},
|
},
|
||||||
devtool: "eval",
|
devtool: "eval",
|
||||||
entry: {
|
entry: {
|
||||||
'swagger-ui-bundle': [
|
"swagger-ui-bundle": [
|
||||||
'./src/polyfills',
|
"./src/polyfills",
|
||||||
'./src/core/index.js'
|
"./src/core/index.js"
|
||||||
],
|
],
|
||||||
'swagger-ui-standalone-preset': [
|
"swagger-ui-standalone-preset": [
|
||||||
'./src/polyfills',
|
"./src/polyfills",
|
||||||
'./src/standalone/index.js',
|
"./src/standalone/index.js",
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
pathinfo: true,
|
pathinfo: true,
|
||||||
filename: '[name].js',
|
filename: "[name].js",
|
||||||
library: "[name]",
|
library: "[name]",
|
||||||
libraryTarget: "umd",
|
libraryTarget: "umd",
|
||||||
chunkFilename: "[id].js"
|
chunkFilename: "[id].js"
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 3200,
|
port: 3200,
|
||||||
contentBase: path.join(__dirname, 'dev-helpers'),
|
contentBase: path.join(__dirname, "dev-helpers"),
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
noInfo: true,
|
noInfo: true,
|
||||||
hot: true,
|
hot: true,
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
var config = require("./webpack-dist.config.js")
|
const config = require("./webpack-dist.config.js")
|
||||||
|
|
||||||
module.exports = config
|
module.exports = config
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
const webpack = require('webpack')
|
const path = require("path")
|
||||||
const path = require('path')
|
const deepMerge = require("deepmerge")
|
||||||
const deepMerge = require('deepmerge')
|
const webpackConfig = require("./webpack-dist-bundle.config.js")
|
||||||
const webpackConfig = require('./webpack-dist-bundle.config.js')
|
const DEPS_CHECK_DIR = require("./package.json").config.deps_check_dir
|
||||||
const DEPS_CHECK_DIR = require('./package.json').config.deps_check_dir
|
|
||||||
|
|
||||||
module.exports = deepMerge(
|
module.exports = deepMerge(
|
||||||
webpackConfig, {
|
webpackConfig, {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module.exports = require("./make-webpack-config")({
|
module.exports = require("./make-webpack-config")({
|
||||||
|
|
||||||
});
|
})
|
||||||
45
webpack.dist-style.config.js
Normal file
45
webpack.dist-style.config.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
const ExtractTextPlugin = require("extract-text-webpack-plugin")
|
||||||
|
|
||||||
|
module.exports = [{
|
||||||
|
test: /\.(css)(\?.*)?$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: "style-loader",
|
||||||
|
use: [
|
||||||
|
"css-loader",
|
||||||
|
"postcss-loader"
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{ test: /\.(scss)(\?.*)?$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: "style-loader",
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: "css-loader",
|
||||||
|
options: { minimize: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: "postcss-loader",
|
||||||
|
options: { sourceMap: true }
|
||||||
|
},
|
||||||
|
{ loader: "sass-loader",
|
||||||
|
options: {
|
||||||
|
outputStyle: "expanded",
|
||||||
|
sourceMap: true,
|
||||||
|
sourceMapContents: "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{ test: /\.(less)(\?.*)?$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: "style-loader",
|
||||||
|
use: ["css-loader",
|
||||||
|
{
|
||||||
|
loader: "postcss-loader",
|
||||||
|
},
|
||||||
|
"less-loader"
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}]
|
||||||
Reference in New Issue
Block a user