mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
revert webpack config to initial
This commit is contained in:
parent
6c02701ed6
commit
81a0e5aadd
2 changed files with 11 additions and 22 deletions
|
|
@ -23,16 +23,7 @@ module.exports = (env) => {
|
|||
test: /\.css$/,
|
||||
use: isDevBuild
|
||||
? ["style-loader", "css-loader"]
|
||||
: ExtractTextPlugin.extract({
|
||||
use: [
|
||||
{
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
minimize: { discardComments: { removeAll: true } }
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
: ExtractTextPlugin.extract({ use: "css-loader?minimize" })
|
||||
},
|
||||
{ test: /\.(png|jpg|jpeg|gif|svg)$/, use: "url-loader?limit=25000" }
|
||||
]
|
||||
|
|
@ -45,19 +36,17 @@ module.exports = (env) => {
|
|||
})
|
||||
].concat(isDevBuild
|
||||
? [
|
||||
// Plugins that apply in development builds only
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
filename: "[file].map",
|
||||
filename: "[file].map", // Remove this line if you prefer inline source maps
|
||||
moduleFilenameTemplate:
|
||||
path.relative(bundleOutputDir,
|
||||
"[resourcePath]")
|
||||
"[resourcePath]") // Point sourcemap entries to the original file locations on disk
|
||||
})
|
||||
]
|
||||
: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
output: {
|
||||
comments: false
|
||||
}
|
||||
}),
|
||||
// Plugins that apply in production builds only
|
||||
new webpack.optimize.UglifyJsPlugin(),
|
||||
new ExtractTextPlugin("site.css")
|
||||
])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const webpack = require("webpack");
|
|||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
|
||||
module.exports = (env) => {
|
||||
const extractCSS = new ExtractTextPlugin("vendor.css");
|
||||
const extractCss = new ExtractTextPlugin("vendor.css");
|
||||
const isDevBuild = !(env && env.prod);
|
||||
return [
|
||||
{
|
||||
|
|
@ -16,7 +16,7 @@ module.exports = (env) => {
|
|||
{ test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, use: "url-loader?limit=100000" },
|
||||
{
|
||||
test: /\.css(\?|$)/,
|
||||
use: extractCSS.extract([isDevBuild ? "css-loader" : "css-loader?minimize"])
|
||||
use: extractCss.extract([isDevBuild ? "css-loader" : "css-loader?minimize"])
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -24,16 +24,16 @@ module.exports = (env) => {
|
|||
vendor: [
|
||||
"bootstrap", "bootstrap/dist/css/bootstrap.css", "event-source-polyfill", "isomorphic-fetch",
|
||||
"react", "react-dom", "react-router-dom", "jquery"
|
||||
],
|
||||
]
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, "wwwroot", "dist"),
|
||||
publicPath: "dist/",
|
||||
filename: "[name].js",
|
||||
library: "[name]_[hash]",
|
||||
library: "[name]_[hash]"
|
||||
},
|
||||
plugins: [
|
||||
extractCSS,
|
||||
extractCss,
|
||||
new webpack.ProvidePlugin({
|
||||
$: "jquery",
|
||||
jQuery: "jquery"
|
||||
|
|
|
|||
Loading…
Reference in a new issue