mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
fix: call to wp instead of r for css
The intention of using r was to fix problems with windows paths, but calling r will try to resolve path as well. This was breaking original webpack resolve mechanism from node_modules
This commit is contained in:
parent
6e44648bfc
commit
a1d78988c0
@ -8,7 +8,7 @@
|
||||
<script>
|
||||
<% if (loading) { %>import NuxtLoading from '<%= (typeof loading === "string" ? loading : "./components/nuxt-loading.vue") %>'<% } %>
|
||||
<% css.forEach(function (c) { %>
|
||||
import '<%= r(c.src || c) %>'
|
||||
import '<%= wp(c.src || c) %>'
|
||||
<% }) %>
|
||||
|
||||
let layouts = {
|
||||
|
@ -10,7 +10,7 @@ import PostCompilePlugin from 'post-compile-webpack-plugin'
|
||||
import serialize from 'serialize-javascript'
|
||||
import { createBundleRenderer } from 'vue-server-renderer'
|
||||
import { join, resolve, basename, dirname } from 'path'
|
||||
import { isUrl, r } from './utils'
|
||||
import { isUrl, r, wp } from './utils'
|
||||
import clientWebpackConfig from './webpack/client.config.js'
|
||||
import serverWebpackConfig from './webpack/server.config.js'
|
||||
const debug = require('debug')('nuxt:build')
|
||||
@ -275,7 +275,8 @@ async function generateRoutesAndFiles () {
|
||||
imports: {
|
||||
serialize,
|
||||
hash,
|
||||
r
|
||||
r,
|
||||
wp
|
||||
}
|
||||
})
|
||||
const content = template(Object.assign({}, templateVars, {
|
||||
|
@ -77,7 +77,7 @@ export function chainFn (base, fn) {
|
||||
}
|
||||
}
|
||||
|
||||
function wp (p) {
|
||||
export function wp (p) {
|
||||
/* istanbul ignore if */
|
||||
if (/^win/.test(process.platform)) {
|
||||
p = p.replace(/\\/g, '\\\\')
|
||||
|
Loading…
Reference in New Issue
Block a user