-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from LoanR/vue-restart
Vue restart
- Loading branch information
Showing
155 changed files
with
13,454 additions
and
1,172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"modules": false, | ||
"targets": { | ||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"] | ||
} | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
}, | ||
extends: [ | ||
'plugin:vue/recommended', | ||
'standard' | ||
], | ||
plugins: [ | ||
'vue' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
node_modules/ | ||
bin/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
'use strict' | ||
|
||
const HtmlWebpackPlugin = require('html-webpack-plugin') | ||
const { VueLoaderPlugin } = require('vue-loader') | ||
|
||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.vue$/, | ||
use: 'vue-loader' | ||
}, | ||
{ | ||
test: /\.js$/, | ||
use: 'babel-loader' | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, | ||
use: { | ||
loader: 'url-loader' | ||
} | ||
}, | ||
{ | ||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, | ||
use: { | ||
loader: 'url-loader' | ||
} | ||
}, | ||
{ | ||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, | ||
use: { | ||
loader: 'url-loader' | ||
} | ||
} | ||
] | ||
}, | ||
|
||
plugins: [ | ||
new VueLoaderPlugin(), | ||
new HtmlWebpackPlugin({ | ||
filename: 'index.html', | ||
template: 'index.html', | ||
inject: true | ||
}) | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
'use strict' | ||
|
||
const baseConfig = require('./webpack.conf.base') | ||
|
||
const webpack = require('webpack') | ||
const merge = require('webpack-merge') | ||
|
||
module.exports = merge(baseConfig, { | ||
// mode: 'development', | ||
|
||
devServer: { | ||
// historyApiFallback: true, | ||
hot: true, | ||
watchOptions: { | ||
poll: true | ||
}, | ||
stats: { | ||
all: false, | ||
version: true, | ||
timings: true, | ||
builtAt: true, | ||
modules: true, | ||
maxModules: 0, | ||
errors: true, | ||
warnings: true, | ||
moduleTrace: false, | ||
errorDetails: true | ||
} | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
use: [ | ||
'vue-style-loader', | ||
'css-loader', | ||
'postcss-loader', | ||
'sass-loader' | ||
] | ||
}, | ||
{ | ||
test: /\.(js|vue)$/, | ||
use: 'eslint-loader', | ||
enforce: 'pre' | ||
} | ||
] | ||
}, | ||
|
||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin() | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
'use strict' | ||
|
||
const baseConfig = require('./webpack.conf.base') | ||
|
||
const merge = require('webpack-merge') | ||
const CopyWebpackPlugin = require('copy-webpack-plugin') | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin') | ||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') | ||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') | ||
|
||
const path = require('path') | ||
|
||
function resolve (dir) { | ||
return path.join(__dirname, '..', dir) | ||
} | ||
|
||
module.exports = merge(baseConfig, { | ||
// mode: 'production', | ||
|
||
optimization: { | ||
minimizer: [ | ||
new UglifyJsPlugin({ | ||
cache: true, | ||
parallel: true, | ||
sourceMap: true | ||
}), | ||
new OptimizeCSSAssetsPlugin({}) | ||
], | ||
splitChunks: { | ||
cacheGroups: { | ||
commons: { | ||
test: /[\\/]node_modules[\\/]/, | ||
name: 'vendor', | ||
chunks: 'all' | ||
} | ||
} | ||
} | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, '../dist') | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
use: [ | ||
MiniCssExtractPlugin.loader, | ||
'css-loader', | ||
'postcss-loader', | ||
'sass-loader' | ||
] | ||
} | ||
] | ||
}, | ||
|
||
plugins: [ | ||
new CopyWebpackPlugin([{ | ||
from: resolve('static'), | ||
to: resolve('dist/static'), | ||
toType: 'dir' | ||
}]), | ||
new MiniCssExtractPlugin({ | ||
filename: 'assets/main.css' | ||
}) | ||
] | ||
}) |
Oops, something went wrong.