mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
chore: fix pnp issues [release]
This commit is contained in:
parent
57c6f23a52
commit
5bd4fe08c6
@ -22,7 +22,8 @@
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@vue/babel-preset-jsx": "^1.2.4",
|
||||
"core-js": "^2.6.5",
|
||||
"core-js-compat": "^3.8.1"
|
||||
"core-js-compat": "^3.8.1",
|
||||
"regenerator-runtime": "^0.13.7"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@ -14,6 +14,8 @@ export default {
|
||||
'postcss-preset-env',
|
||||
'postcss-url',
|
||||
'style-resources-loader',
|
||||
'vue-style-loader', // vue-loader
|
||||
'vue-template-compiler', // vue-loader
|
||||
'url-loader'
|
||||
]
|
||||
}
|
||||
|
@ -44,6 +44,8 @@
|
||||
"time-fix-plugin": "^2.0.7",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-loader": "^15.9.6",
|
||||
"vue-style-loader": "^4.1.2",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"webpack": "^4.44.2",
|
||||
"webpack-bundle-analyzer": "^3.9.0",
|
||||
"webpack-dev-middleware": "^4.0.2",
|
||||
|
@ -11,7 +11,7 @@ import WebpackBar from 'webpackbar'
|
||||
import env from 'std-env'
|
||||
import semver from 'semver'
|
||||
|
||||
import { TARGETS, isUrl, urlJoin, getPKG, tryResolve, requireModule } from '@nuxt/utils'
|
||||
import { TARGETS, isUrl, urlJoin, getPKG, tryResolve, requireModule, resolveModule } from '@nuxt/utils'
|
||||
|
||||
import PerfLoader from '../utils/perf-loader'
|
||||
import StyleLoader from '../utils/style-loader'
|
||||
@ -225,25 +225,27 @@ export default class WebpackBaseConfig {
|
||||
// Prioritize nested node_modules in webpack search path (#2558)
|
||||
const webpackModulesDir = ['node_modules'].concat(this.buildContext.options.modulesDir)
|
||||
|
||||
const resolvePath = [
|
||||
this.buildContext.options.rootDir,
|
||||
__dirname,
|
||||
resolveModule('@nuxt/vue-app'),
|
||||
resolveModule('@nuxt/babel-preset-app')
|
||||
]
|
||||
const resolvePlugins = [PnpWebpackPlugin].concat(resolvePath.map(p => PnpWebpackPlugin.moduleLoader(p)))
|
||||
|
||||
return {
|
||||
resolve: {
|
||||
extensions: ['.wasm', '.mjs', '.js', '.json', '.vue', '.jsx'],
|
||||
alias: this.alias(),
|
||||
modules: webpackModulesDir,
|
||||
plugins: [
|
||||
PnpWebpackPlugin,
|
||||
PnpWebpackPlugin.moduleLoader(this.buildContext.options.rootDir),
|
||||
PnpWebpackPlugin.moduleLoader(__dirname)
|
||||
]
|
||||
plugins: resolvePlugins
|
||||
},
|
||||
resolveLoader: {
|
||||
modules: [
|
||||
path.resolve(__dirname, '../node_modules'),
|
||||
...webpackModulesDir
|
||||
],
|
||||
plugins: [
|
||||
PnpWebpackPlugin.moduleLoader(module)
|
||||
]
|
||||
plugins: resolvePlugins
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11269,7 +11269,7 @@ regenerate@^1.4.0:
|
||||
resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
|
||||
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
|
||||
|
||||
regenerator-runtime@^0.13.4:
|
||||
regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7:
|
||||
version "0.13.7"
|
||||
resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55"
|
||||
integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==
|
||||
@ -13332,7 +13332,7 @@ vue-server-renderer@^2.6.12:
|
||||
serialize-javascript "^3.1.0"
|
||||
source-map "0.5.6"
|
||||
|
||||
vue-style-loader@^4.1.0:
|
||||
vue-style-loader@^4.1.0, vue-style-loader@^4.1.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8"
|
||||
integrity sha512-0ip8ge6Gzz/Bk0iHovU9XAUQaFt/G2B61bnWa2tCcqqdgfHs1lF9xXorFbE55Gmy92okFT+8bfmySuUOu13vxQ==
|
||||
|
Loading…
Reference in New Issue
Block a user