Skip to content

Commit

Permalink
reference webpack loaders with require.resolve for yarn pnp compat (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmul authored Nov 15, 2020
1 parent 3d4a59d commit df529e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/plugin-webpack/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ module.exports = function plugin(config, args = {}) {
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
loader: require.resolve('babel-loader'),
options: {
cwd: buildDirectory,
configFile: false,
babelrc: false,
compact: true,
presets: [
[
'@babel/preset-env',
require.resolve('@babel/preset-env'),
{
targets: presetEnvTargets,
bugfixes: true,
Expand Down Expand Up @@ -267,7 +267,7 @@ module.exports = function plugin(config, args = {}) {
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
loader: require.resolve('css-loader'),
},
],
},
Expand All @@ -278,7 +278,7 @@ module.exports = function plugin(config, args = {}) {
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
loader: require.resolve('css-loader'),
options: {
modules: true,
},
Expand All @@ -290,7 +290,7 @@ module.exports = function plugin(config, args = {}) {
exclude: [/\.js?$/, /\.json?$/, /\.css$/],
use: [
{
loader: 'file-loader',
loader: require.resolve('file-loader'),
options: {
name: assetsOutputPattern,
},
Expand Down

1 comment on commit df529e9

@vercel
Copy link

@vercel vercel bot commented on df529e9 Nov 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.