bash: Thu Nov 7 17:04:52 CST 2019

master
ubuntu 5 years ago
parent cb4f738a95
commit 64a3098c79
  1. 7
      dist/css/bundle.css
  2. 1
      dist/images/wave2.svg
  3. 4
      dist/js/bundle.js
  4. 2
      package.json
  5. 1
      src/images/wave2.svg
  6. 42
      webpack.config.js

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 60"><defs><style>.cls{fill:#ffffff;}</style></defs><title>wave</title><g id="wave" data-name="wave"><g id="page"><g id="background"><g id="deco"><path class="cls" d="M166.51,48.09c-8.57-7-15.26-16-22.36-24.21-4.73-5.5-9.63-10.68-15.34-14.79A47.21,47.21,0,0,0,100,0,49.17,49.17,0,0,0,82.13,3.13a49.71,49.71,0,0,0-13.73,8.1c-8.18,6.66-14.79,15.48-22,23.84C41.64,40.64,36.58,46,30.56,50.34A50.27,50.27,0,0,1,0,60H200a50.48,50.48,0,0,1-33.49-11.91Z"/></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 526 B

4
dist/js/bundle.js vendored

File diff suppressed because one or more lines are too long

@ -50,7 +50,7 @@
"start": "webpack-dev-server", "start": "webpack-dev-server",
"release": "cp -r dist docs/dist && cp *.html docs && cleancss dist/bundle.css -o docs/dist/bundle.css", "release": "cp -r dist docs/dist && cp *.html docs && cleancss dist/bundle.css -o docs/dist/bundle.css",
"release-win": "cleancss dist/bundle.css -o docs/dist/bundle.css", "release-win": "cleancss dist/bundle.css -o docs/dist/bundle.css",
"build": "rm -rf dist && cross-env ENV_MODE=build webpack", "build": "rm -rf dist && cross-env ENV_MODE=build webpack && mv images dist",
"clean": "rm -rf dist" "clean": "rm -rf dist"
}, },
"author": "mashirozx", "author": "mashirozx",

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 60"><defs><style>.cls{fill:#ffffff;}</style></defs><title>wave</title><g id="wave" data-name="wave"><g id="page"><g id="background"><g id="deco"><path class="cls" d="M166.51,48.09c-8.57-7-15.26-16-22.36-24.21-4.73-5.5-9.63-10.68-15.34-14.79A47.21,47.21,0,0,0,100,0,49.17,49.17,0,0,0,82.13,3.13a49.71,49.71,0,0,0-13.73,8.1c-8.18,6.66-14.79,15.48-22,23.84C41.64,40.64,36.58,46,30.56,50.34A50.27,50.27,0,0,1,0,60H200a50.48,50.48,0,0,1-33.49-11.91Z"/></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 526 B

@ -3,7 +3,7 @@ const autoprefixer = require('autoprefixer');
const TerserPlugin = require('terser-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
// const HtmlWebpackPlugin = require('html-webpack-plugin'); // const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin');
// const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin");
// still not work... // still not work...
// const imgOutputPath = process.env.ENV_MODE === "build" ? 'images/[name].[ext]' : '../images/[name].[ext]'; // const imgOutputPath = process.env.ENV_MODE === "build" ? 'images/[name].[ext]' : '../images/[name].[ext]';
@ -47,16 +47,26 @@ module.exports = [{
{ {
test: /\.scss$/, test: /\.scss$/,
use: [ use: [
//MiniCssExtractPlugin.loader, // no need with MiniCssExtractPlugin
// {
// loader: 'file-loader',
// options: {
// name: './css/bundle.css',
// // outputPath: './css',
// },
// },
// bug with file-loader: https://github.com/webpack-contrib/css-loader/issues/864#issuecomment-445815198
// {
// loader: 'extract-loader'
// },
{ {
loader: 'file-loader', loader: MiniCssExtractPlugin.loader,
options: { // options: {
name: './css/bundle.css', // // you can specify a publicPath here
// outputPath: './css', // // by default it uses publicPath in webpackOptions.output
}, // publicPath: '../',
}, // hmr: process.env.NODE_ENV === 'development',
{ // },
loader: 'extract-loader'
}, },
{ {
loader: 'css-loader' loader: 'css-loader'
@ -118,11 +128,11 @@ module.exports = [{
// template: './src/single.html', // template: './src/single.html',
// chunks: ['single'] // chunks: ['single']
// }) // })
// new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
// // Options similar to the same options in webpackOptions.output // Options similar to the same options in webpackOptions.output
// // both options are optional // both options are optional
// filename: "[name].css", filename: "css/bundle.css",
// chunkFilename: "[name]_[hash].css" // chunkFilename: "[id].css"
// }) })
] ]
}]; }];
Loading…
Cancel
Save