Skip to content

Commit

Permalink
Merge branch 'package_update' into dev -- #145
Browse files Browse the repository at this point in the history
  • Loading branch information
fritx committed Jul 26, 2022
2 parents d6e79ad + a059665 commit 29e662f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 59 deletions.
37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,49 @@
"prepublish": "npm run build"
},
"main": "dist/vue-at.js",
"dependencies": {},
"engines": {
"node": "14.x"
},
"peerDependencies": {
"vue": "2.x"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/core": "^7.18.9",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.18.9",
"@babel/plugin-proposal-do-expressions": "^7.18.6",
"@babel/plugin-proposal-export-default-from": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.6",
"@babel/plugin-proposal-function-bind": "^7.18.6",
"@babel/plugin-proposal-export-default-from": "^7.18.9",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-function-bind": "^7.18.9",
"@babel/plugin-proposal-function-sent": "^7.18.6",
"@babel/plugin-proposal-json-strings": "^7.18.6",
"@babel/plugin-proposal-logical-assignment-operators": "^7.18.6",
"@babel/plugin-proposal-logical-assignment-operators": "^7.18.9",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.18.6",
"@babel/plugin-proposal-pipeline-operator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@babel/plugin-proposal-pipeline-operator": "^7.18.9",
"@babel/plugin-proposal-throw-expressions": "^7.18.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/preset-env": "^7.18.6",
"@babel/preset-env": "^7.18.9",
"babel-loader": "^8.2.5",
"babel-preset-minify": "^0.5.1",
"babel-preset-minify": "^0.5.2",
"cross-env": "^7.0.3",
"css-loader": "^0.28.11",
"element-ui": "^2.15.9",
"file-loader": "^1.1.9",
"node-sass": "^7.0.1",
"sass-loader": "^10.3.1",
"style-loader": "^0.23.1",
"file-loader": "^6.2.0",
"sass": "^1.53.0",
"sass-loader": "^13.0.2",
"style-loader": "^3.3.1",
"terser-webpack-plugin": "^5.3.3",
"textarea-caret": "^3.1.0",
"uglifyjs-webpack-plugin": "^1.3.0",
"url-loader": "^4.1.1",
"vue": "^2.6.14",
"vue": "^2.7.8",
"vue-loader": "^14.2.4",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.14",
"vue-template-compiler": "^2.7.8",
"vuetify": "^2.6.7",
"webpack": "^4.46.0",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^3.11.0"
}
Expand Down
47 changes: 29 additions & 18 deletions webpack/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,53 @@ module.exports = {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
// Since sass-loader (weirdly) has SCSS as its default parse mode, we map
// the "scss" and "sass" values for the lang attribute to the right configs here.
// other preprocessors should work out of the box, no loader config like this nessessary.
'scss': 'vue-style-loader!css-loader!sass-loader',
'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax'
}
// other vue-loader options go here
}
use: ['vue-loader']
},
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader',
]
},
{
test: /\.sass$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader?indentedSyntax',
]
},
{
test: /\.js$/,
loader: 'babel-loader',
use: ['babel-loader'],
exclude: [/node_modules/, path.resolve(__dirname, '../dist')]
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
use: ['style-loader', 'css-loader'],
},
{
test: /\.(ttf|woff)$/,
loader: 'url-loader'
use: ['url-loader'],
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
}
]
}
]
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' webpack
// https://vuejs.org/v2/guide/installation.html#Standalone-vs-Runtime-only-Build
// 'vue$': 'vue/dist/vue.common.js'
}
Expand Down
2 changes: 1 addition & 1 deletion webpack/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Object.assign(config, {
historyApiFallback: true,
noInfo: true
},
devtool: isProd ? false : '#eval-source-map',
devtool: isProd ? false : 'eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': {
Expand Down
35 changes: 14 additions & 21 deletions webpack/prod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const TerserPlugin = require("terser-webpack-plugin");
var path = require('path')
var webpack = require('webpack')
var base = require('./base')
Expand All @@ -14,7 +14,7 @@ Object.assign(config, {
filename: '[name].js',
libraryTarget: 'commonjs2'
},
devtool: '#source-map',
devtool: 'source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': {
Expand All @@ -28,24 +28,17 @@ Object.assign(config, {
'vue',
'textarea-caret'
]),
// todo: upgrade webpack to 3.x
// switched to uglifyjs-webpack-plugin
// https://github.com/vuejs-templates/webpack/blob/cd4d7d957c9af3d37092c79bf490b56b8d88b108/template/build/webpack.prod.conf.js#L37
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
],
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
parallel: true,
terserOptions: {
compress: true,
sourceMap: true
}
},
sourceMap: true,
parallel: true
})
// http://vue-loader.vuejs.org/en/workflow/production.html
// new webpack.optimize.UglifyJsPlugin({
// sourceMap: true,
// compress: {
// warnings: false
// }
// })
]
}),
]
}
})

0 comments on commit 29e662f

Please sign in to comment.