mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
revert to no-cdn publicPath
This commit is contained in:
parent
05c6dd958c
commit
4431dfa368
@ -84,6 +84,7 @@ export function options () {
|
|||||||
if (this.options.build && !Array.isArray(this.options.build.loaders)) extraDefaults.loaders = defaultsLoaders
|
if (this.options.build && !Array.isArray(this.options.build.loaders)) extraDefaults.loaders = defaultsLoaders
|
||||||
if (this.options.build && !Array.isArray(this.options.build.postcss)) extraDefaults.postcss = defaultsPostcss
|
if (this.options.build && !Array.isArray(this.options.build.postcss)) extraDefaults.postcss = defaultsPostcss
|
||||||
this.options.build = _.defaultsDeep(this.options.build, defaults, extraDefaults)
|
this.options.build = _.defaultsDeep(this.options.build, defaults, extraDefaults)
|
||||||
|
/* istanbul ignore if */
|
||||||
if (this.dev && isUrl(this.options.build.publicPath)) {
|
if (this.dev && isUrl(this.options.build.publicPath)) {
|
||||||
this.options.build.publicPath = defaults.publicPath
|
this.options.build.publicPath = defaults.publicPath
|
||||||
}
|
}
|
||||||
|
2
test/fixtures/with-config/nuxt.config.js
vendored
2
test/fixtures/with-config/nuxt.config.js
vendored
@ -21,7 +21,7 @@ module.exports = {
|
|||||||
string: 'Nuxt.js'
|
string: 'Nuxt.js'
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
publicPath: 'https://cdn.nuxtjs.org',
|
publicPath: '/orion/',
|
||||||
analyze: {
|
analyze: {
|
||||||
analyzerMode: 'disabled',
|
analyzerMode: 'disabled',
|
||||||
generateStatsFile: true
|
generateStatsFile: true
|
||||||
|
@ -31,7 +31,7 @@ test('/ (custom app.html)', async t => {
|
|||||||
|
|
||||||
test('/ (custom build.publicPath)', async t => {
|
test('/ (custom build.publicPath)', async t => {
|
||||||
const { html } = await nuxt.renderRoute('/')
|
const { html } = await nuxt.renderRoute('/')
|
||||||
t.true(html.includes('src="https://cdn.nuxtjs.org/vendor.bundle'))
|
t.true(html.includes('src="/test/orion/vendor.bundle'))
|
||||||
})
|
})
|
||||||
|
|
||||||
test('/test/ (router base)', async t => {
|
test('/test/ (router base)', async t => {
|
||||||
|
Loading…
Reference in New Issue
Block a user