Improve asset build

This commit is contained in:
Anton Vakhrushev 2020-02-29 09:16:39 +03:00
parent a2d8855f28
commit a80fbfb2da
4 changed files with 1143 additions and 1207 deletions

View File

@ -74,7 +74,7 @@ export default {
};
</script>
<style lang="scss">
<style lang="scss" scoped>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;

2279
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,29 +5,29 @@
"version": "1.0.0",
"description": "Homepage",
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.3",
"@babel/runtime": "^7.7.2",
"autoprefixer": "^9.7.0",
"@babel/core": "^7.8.6",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.6",
"@babel/runtime": "^7.8.4",
"autoprefixer": "^9.7.4",
"babel-loader": "^8.0.0",
"core-js": "^3.6.4",
"css-loader": "^2.1.1",
"glob": "^7.1.6",
"mini-css-extract-plugin": "^0.6.0",
"node-sass": "^4.13.0",
"node-sass": "^4.13.1",
"postcss-loader": "^3.0.0",
"prettier": "^1.18.2",
"qs": "^6.9.0",
"prettier": "^1.19.1",
"qs": "^6.9.1",
"sass-loader": "^7.3.1",
"style-loader": "^0.23.1",
"underscore": "^1.9.1",
"vue": "^2.6.10",
"vue-loader": "^15.7.1",
"underscore": "^1.9.2",
"vue": "^2.6.11",
"vue-loader": "^15.9.0",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9"
"vue-template-compiler": "^2.6.11",
"webpack": "^4.41.6",
"webpack-cli": "^3.3.11"
},
"scripts": {
"build": "webpack --config webpack.config.js --progress",
@ -41,9 +41,6 @@
},
"dependencies": {},
"browserslist": [
"last 5 version",
"> 1%",
"maintained node versions",
"not dead"
"defaults"
]
}

View File

@ -26,34 +26,20 @@ module.exports = (env = {}) => {
const MINI_CSS_LOADER = MiniCssExtractPlugin.loader;
const BABEL_LOADER = {
const JS_LOADER = {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-class-properties',
presets: [
[
'@babel/preset-env',
{ modules: false, useBuiltIns: 'usage', corejs: 3 },
],
],
},
};
const VUE_LOADER = {
loader: 'vue-loader',
options: {
loaders: {
css: [
MINI_CSS_LOADER, //'vue-style-loader',
CSS_LOADER,
POSTCSS_LOADER,
],
scss: [
MINI_CSS_LOADER, //'vue-style-loader',
CSS_LOADER,
POSTCSS_LOADER,
SCSS_LOADER,
],
},
},
};
return {
@ -69,14 +55,10 @@ module.exports = (env = {}) => {
{
test: /\.js$/,
exclude: /node_modules/,
use: [BABEL_LOADER],
use: [JS_LOADER],
},
{
test: /\.css$/,
use: [MINI_CSS_LOADER, CSS_LOADER, POSTCSS_LOADER],
},
{
test: /\.scss$/,
test: /\.(scss|css)$/,
use: [MINI_CSS_LOADER, CSS_LOADER, POSTCSS_LOADER, SCSS_LOADER],
},
{