mirror of
https://github.com/jlengrand/open-wc.git
synced 2026-04-04 08:31:20 +00:00
17 lines
390 B
JavaScript
17 lines
390 B
JavaScript
module.exports = {
|
|
nodeResolve: true,
|
|
open: './_site-dev',
|
|
responseTransformers: [
|
|
function rewriteBasePath({ contentType, body }) {
|
|
if (contentType.includes('text/html')) {
|
|
return {
|
|
body: body
|
|
.replace(/href="\//g, 'href="/_site-dev/')
|
|
.replace(/src="\//g, 'src="/_site-dev/'),
|
|
};
|
|
}
|
|
return null;
|
|
},
|
|
],
|
|
};
|