mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-21 17:24:14 -05:00
[update] webpack production
This commit is contained in:
parent
e08db864da
commit
5991922840
|
|
@ -10,7 +10,11 @@
|
|||
"no-plusplus": "off",
|
||||
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["./webpack.config.babel.js"]}],
|
||||
"react/forbid-prop-types": "off",
|
||||
"react/jsx-filename-extension": "off"
|
||||
"react/jsx-filename-extension": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"object-curly-newline": "off",
|
||||
"no-unused-vars": "off",
|
||||
"linebreak-style": "off"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
|
|
|
|||
5237
build/bundle.js
5237
build/bundle.js
File diff suppressed because one or more lines are too long
47
build/bundle.js.LICENSE
Normal file
47
build/bundle.js.LICENSE
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
|
||||
/** @license React v16.7.0
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v16.7.0
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v0.12.0
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
1
build/main.css
Normal file
1
build/main.css
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -27,7 +27,7 @@
|
|||
"react-router": "^4.2.0",
|
||||
"react-router-dom": "^4.2.2",
|
||||
"react-transition-group": "^2.5.0",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.2.3",
|
||||
|
|
@ -41,6 +41,7 @@
|
|||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-loader": "^8.0.5",
|
||||
"css-loader": "^2.1.0",
|
||||
"eslint": "^5.7.1",
|
||||
|
|
@ -50,8 +51,10 @@
|
|||
"eslint-plugin-react": "^7.0.0",
|
||||
"mini-css-extract-plugin": "^0.5.0",
|
||||
"node-sass": "^4.10.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||
"sass-loader": "^7.0.x",
|
||||
"style-loader": "^0.23.1",
|
||||
"uglifyjs-webpack-plugin": "^2.1.1",
|
||||
"webpack": "^4.28.3",
|
||||
"webpack-cli": "^3.2.0",
|
||||
"webpack-dev-server": "^3.1.14"
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ export default function Home() {
|
|||
<span>Built by fans for fans.</span>
|
||||
<br /><br />
|
||||
<div>Made with <span className="heart">♥</span> by
|
||||
<br />Danude Sandstorm
|
||||
<br />Database contributed by Chiodosin1
|
||||
<br />Art provided by Afjak and Blitser
|
||||
<br />Danude Sandstorm (Project Lead)
|
||||
<br />Chiodosin1 (Database Contributions)
|
||||
<br />Afjak and Blitser (Art and Knowledge)
|
||||
</div>
|
||||
<div>Do you like the site? You can donate to support it!</div>
|
||||
<div className="donate"><Donate /></div>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
const path = require('path');
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const webpack = require('webpack');
|
||||
require("@babel/register");
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
require('@babel/register');
|
||||
|
||||
const devMode = (process.env.NODE_ENV !== 'production' && process.argv.indexOf('-p') === -1);
|
||||
|
||||
const config = {
|
||||
entry: ["@babel/polyfill", `${__dirname}/src/components/index.js`],
|
||||
entry: ['@babel/polyfill', `${__dirname}/src/components/index.js`],
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/build`,
|
||||
|
|
@ -15,6 +17,15 @@ const config = {
|
|||
},
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
extractComments: true
|
||||
}),
|
||||
new OptimizeCSSAssetsPlugin({})
|
||||
],
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
styles: {
|
||||
|
|
@ -34,15 +45,15 @@ const config = {
|
|||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
"@babel/preset-react",
|
||||
"@babel/preset-flow",
|
||||
'presets': [
|
||||
'@babel/preset-env',
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-flow',
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-runtime",
|
||||
["@babel/plugin-proposal-decorators", {"legacy": true }],
|
||||
["@babel/plugin-proposal-class-properties", { "loose": true }]
|
||||
'plugins': [
|
||||
'@babel/plugin-transform-runtime',
|
||||
['@babel/plugin-proposal-decorators', {'legacy': true }],
|
||||
['@babel/plugin-proposal-class-properties', { 'loose': true }]
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
@ -66,24 +77,13 @@ const config = {
|
|||
},
|
||||
|
||||
// First array is dev only, second is production
|
||||
plugins: devMode ? [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].css',
|
||||
chunkFilename: '[id].css',
|
||||
})
|
||||
] : [
|
||||
plugins: devMode ? [] : [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
output: {
|
||||
comments: false,
|
||||
},
|
||||
warnings: true,
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].[hash].css',
|
||||
chunkFilename: '[id].[hash].css',
|
||||
filename: '[name].css',
|
||||
chunkFilename: '[id].css',
|
||||
})
|
||||
],
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user