Skip to content

Commit

Permalink
Minor cleanup of webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
euvl committed Apr 12, 2020
1 parent 4335f2b commit 63510c5
Show file tree
Hide file tree
Showing 16 changed files with 11,147 additions and 11,333 deletions.
36 changes: 0 additions & 36 deletions .circleci/config.yml

This file was deleted.

42 changes: 29 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
module.exports = {
root: true,
extends: 'standard',
plugins: [
'html'

env: {
node: true
},

extends: [
'plugin:vue/essential',
'eslint:recommended',
'@vue/prettier',
],
'rules': {
'no-multi-spaces': [
'error', {
exceptions: {
'ImportDeclaration': true
}

parserOptions: {
ecmaVersion: 2020
},

rules: {
'no-console': 'off',
'no-debugger': 'off'
},

overrides: [
{
files: [
'**/*.spec.{j,t}s?(x)',
// '**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
],
'arrow-parens': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
],
}
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "none"
}
11 changes: 5 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module.exports = function(babel) {
babel.cache(true);
babel.cache(true)

return {
presets: ["@babel/preset-env"],
comments: false,
plugins: ["@babel/plugin-proposal-object-rest-spread"]
};
};
presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-proposal-object-rest-spread']
}
}
28 changes: 18 additions & 10 deletions build/webpack.base.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin")
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const { VueLoaderPlugin } = require('vue-loader')

module.exports = {
Expand All @@ -10,15 +10,20 @@ module.exports = {
library: 'vue-js-modal',
libraryTarget: 'umd',
path: path.resolve(__dirname, '../dist'),
publicPath: '/dist/',
publicPath: '/dist/'
},
resolve: {
extensions: ['.ts', '.js']
},
optimization: {
minimizer: [
new UglifyJsPlugin({
cache: true,
parallel: true
}),
new OptimizeCSSAssetsPlugin({})
new OptimizeCSSAssetsPlugin({
canPrint: true
})
]
},
module: {
Expand All @@ -32,16 +37,19 @@ module.exports = {
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: {
appendTsSuffixTo: [/\.vue$/]
}
},
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
]
use: ['vue-style-loader', 'css-loader']
}
]
},
plugins: [
new VueLoaderPlugin()
]
plugins: [new VueLoaderPlugin()]
}
11 changes: 4 additions & 7 deletions build/webpack.ssr-no-css.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports = {
Expand All @@ -26,7 +26,7 @@ module.exports = {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
loader: 'vue-loader'
},
{
test: /\.js$/,
Expand All @@ -35,17 +35,14 @@ module.exports = {
},
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader'
]
use: [MiniCssExtractPlugin.loader, 'css-loader']
}
]
},
plugins: [
new VueLoaderPlugin(),
new MiniCssExtractPlugin({
filename: "styles.css",
filename: 'styles.css'
})
]
}
36 changes: 0 additions & 36 deletions circle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ssr.index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ssr.nocss.js

Large diffs are not rendered by default.

Loading

0 comments on commit 63510c5

Please sign in to comment.