mirror of
https://github.com/c8r/x0.git
synced 2024-09-11 13:45:52 +03:00
Adjust default basename
This commit is contained in:
parent
e61b3b19de
commit
0cbed4f71c
2
cli.js
2
cli.js
@ -92,7 +92,7 @@ const opts = Object.assign({
|
|||||||
filename,
|
filename,
|
||||||
stats,
|
stats,
|
||||||
outDir: 'dist',
|
outDir: 'dist',
|
||||||
basename: '/',
|
basename: '',
|
||||||
scope: {},
|
scope: {},
|
||||||
pkg,
|
pkg,
|
||||||
}, config, cli.flags)
|
}, config, cli.flags)
|
||||||
|
@ -180,7 +180,7 @@ module.exports = async (opts) => {
|
|||||||
config.output = {
|
config.output = {
|
||||||
path: opts.outDir,
|
path: opts.outDir,
|
||||||
filename: 'bundle.js',
|
filename: 'bundle.js',
|
||||||
publicPath: opts.basename
|
publicPath: opts.basename + '/'
|
||||||
}
|
}
|
||||||
|
|
||||||
// push per route/page
|
// push per route/page
|
||||||
|
@ -5,7 +5,7 @@ const defaultTemplate = require('./template')
|
|||||||
module.exports = opts => {
|
module.exports = opts => {
|
||||||
const template = opts.template || defaultTemplate
|
const template = opts.template || defaultTemplate
|
||||||
return context => {
|
return context => {
|
||||||
const scripts = generateJSReferences(context.js, context.publicPath + '/')
|
const scripts = generateJSReferences(context.js, context.publicPath)
|
||||||
return minify(
|
return minify(
|
||||||
template(Object.assign({}, context, {
|
template(Object.assign({}, context, {
|
||||||
scripts
|
scripts
|
||||||
|
Loading…
Reference in New Issue
Block a user