chore: migrate to Yarn 2 (#2316)

* chore: migrate to Yarn 2

* Update config.yml
This commit is contained in:
ylemkimon
2020-08-03 18:24:56 +09:00
committed by GitHub
parent 591bc7b4be
commit f97c5454f8
15 changed files with 22802 additions and 16898 deletions

View File

@@ -1,11 +1,17 @@
// @flow
const path = require('path');
// $FlowIgnore
const TerserPlugin = require('terser-webpack-plugin');
// $FlowIgnore
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// $FlowIgnore
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const {version} = require("./package.json");
// $FlowIgnore
const browserslist = require('browserslist')();
// $FlowIgnore
const caniuse = require('caniuse-lite');
// from the least supported to the most supported
@@ -61,9 +67,11 @@ function createConfig(target /*: Target */, dev /*: boolean */,
options: {importLoaders: 1},
}, {
loader: 'postcss-loader',
// $FlowIgnore
options: {plugins: [require('postcss-preset-env')()]},
}];
if (minimize) {
// $FlowIgnore
cssLoaders[1].options.plugins.push(require('cssnano')());
}
@@ -160,6 +168,12 @@ function createConfig(target /*: Target */, dev /*: boolean */,
performance: {
hints: false,
},
resolve: {
plugins: [PnpWebpackPlugin],
},
resolveLoader: {
plugins: [PnpWebpackPlugin.moduleLoader(module)],
},
};
}