From 0cbed4f71c0fa692b2ba2bc5115b3c2a7822a443 Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Tue, 22 May 2018 00:37:19 -0400 Subject: [PATCH] Adjust default basename --- cli.js | 2 +- lib/build.js | 2 +- lib/createTemplate.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli.js b/cli.js index 6ac50db..f76441b 100755 --- a/cli.js +++ b/cli.js @@ -92,7 +92,7 @@ const opts = Object.assign({ filename, stats, outDir: 'dist', - basename: '/', + basename: '', scope: {}, pkg, }, config, cli.flags) diff --git a/lib/build.js b/lib/build.js index f87bbf9..d8b1912 100644 --- a/lib/build.js +++ b/lib/build.js @@ -180,7 +180,7 @@ module.exports = async (opts) => { config.output = { path: opts.outDir, filename: 'bundle.js', - publicPath: opts.basename + publicPath: opts.basename + '/' } // push per route/page diff --git a/lib/createTemplate.js b/lib/createTemplate.js index 2596ebf..efa38bb 100644 --- a/lib/createTemplate.js +++ b/lib/createTemplate.js @@ -5,7 +5,7 @@ const defaultTemplate = require('./template') module.exports = opts => { const template = opts.template || defaultTemplate return context => { - const scripts = generateJSReferences(context.js, context.publicPath + '/') + const scripts = generateJSReferences(context.js, context.publicPath) return minify( template(Object.assign({}, context, { scripts