Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Update dependencies #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"presets": [
["env", { "modules": false }],
"stage-3"
["@babel/env", { "modules": false }],
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
4 changes: 2 additions & 2 deletions bili.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const vue = require('rollup-plugin-vue')
const vue = require('rollup-plugin-vue');

module.exports = {
banner: true,
Expand All @@ -8,4 +8,4 @@ module.exports = {
vue({ css: true })
],
outDir: 'lib'
}
};
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@
"lib"
],
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"dev": "cross-env NODE_ENV=development webpack-dev-server --mode development --open --hot",
"build:lib": "rm -rf ./lib && bili src/index.vue",
"build:example": "rm -rf ./dist && cross-env NODE_ENV=production webpack --progress --hide-modules"
"build:example": "rm -rf ./dist && cross-env NODE_ENV=production webpack --mode production --progress --hide-modules"
},
"dependencies": {
"vue": "^2.5.11"
"vue": "^2.5.22"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-3": "^6.24.1",
"bili": "2.2.6",
"cross-env": "^5.0.5",
"css-loader": "^0.28.7",
"file-loader": "^1.1.4",
"rollup-plugin-vue": "^3.0.0",
"vue-loader": "^13.0.5",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.1"
"@babel/core": "^7.2.2",
"babel-loader": "^8.0.5",
"@babel/preset-env": "^7.2.3",
"bili": "3.4.2",
"cross-env": "^5.2.0",
"css-loader": "^2.1.0",
"file-loader": "^3.0.1",
"rollup-plugin-vue": "^4.6.1",
"vue-loader": "^15.5.1",
"vue-template-compiler": "^2.5.22",
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14"
}
}
42 changes: 26 additions & 16 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
var path = require('path')
var webpack = require('webpack')
const path = require('path');
const webpack = require('webpack');
const devMode = process.env.NODE_ENV !== 'production';
const TerserPlugin = require('terser-webpack-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin');

module.exports = {
entry: './example/main.js',
Expand All @@ -19,11 +22,6 @@ module.exports = {
}, {
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
}
// other vue-loader options go here
}
},
{
test: /\.js$/,
Expand All @@ -45,6 +43,24 @@ module.exports = {
},
extensions: ['*', '.js', '.vue', '.json']
},
optimization: {
minimize: !devMode,
minimizer: [
new TerserPlugin({
terserOptions: {
ecma: 6,
compress: true,
output: {
comments: false,
beautify: false
}
}
})
]
},
plugins: [
new VueLoaderPlugin(),
],
devServer: {
historyApiFallback: true,
noInfo: true,
Expand All @@ -54,25 +70,19 @@ module.exports = {
hints: false
},
devtool: '#eval-source-map'
}
};

if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
module.exports.devtool = '#source-map';
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
]);
}
Loading