Skip to content
Snippets Groups Projects
Commit 590b3fd3 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Rename the bundle name to the package name

parent e5cdd0f0
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<script type="module" id="vpu-person-select-wc-src" src="bundle.js"></script>
<script type="module" id="vpu-person-select-wc-src" src="vpu-person-select.js"></script>
</head>
<body>
......
// Trick to use the auto-downloaded puppeteer chrome binary
process.env.CHROME_BIN = require('puppeteer').executablePath();
const pkg = require('./package.json');
module.exports = function(config) {
config.set({
basePath: 'dist',
frameworks: ['mocha', 'chai'],
files: [
'./bundle.js',
{pattern: './' + pkg.name + '.js', included: true, watched: true, served: true, type: 'module'},
{pattern: './**/*', included: false, watched: true, served: true},
],
autoWatch: true,
......
......@@ -9,13 +9,14 @@ import replace from "rollup-plugin-replace";
import serve from 'rollup-plugin-serve';
import multiEntry from 'rollup-plugin-multi-entry';
const pkg = require('./package.json');
const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local';
console.log("build: " + build);
export default {
input: (build != 'test') ? 'src/demo.js' : 'test/**/*.js',
output: {
file: 'dist/bundle.js',
file: 'dist/' + pkg.name + '.js',
format: 'esm'
},
plugins: [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment