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 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="UTF-8"> <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> </head>
<body> <body>
......
// Trick to use the auto-downloaded puppeteer chrome binary // Trick to use the auto-downloaded puppeteer chrome binary
process.env.CHROME_BIN = require('puppeteer').executablePath(); process.env.CHROME_BIN = require('puppeteer').executablePath();
const pkg = require('./package.json');
module.exports = function(config) { module.exports = function(config) {
config.set({ config.set({
basePath: 'dist', basePath: 'dist',
frameworks: ['mocha', 'chai'], frameworks: ['mocha', 'chai'],
files: [ files: [
'./bundle.js', {pattern: './' + pkg.name + '.js', included: true, watched: true, served: true, type: 'module'},
{pattern: './**/*', included: false, watched: true, served: true}, {pattern: './**/*', included: false, watched: true, served: true},
], ],
autoWatch: true, autoWatch: true,
......
...@@ -9,13 +9,14 @@ import replace from "rollup-plugin-replace"; ...@@ -9,13 +9,14 @@ import replace from "rollup-plugin-replace";
import serve from 'rollup-plugin-serve'; import serve from 'rollup-plugin-serve';
import multiEntry from 'rollup-plugin-multi-entry'; import multiEntry from 'rollup-plugin-multi-entry';
const pkg = require('./package.json');
const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local'; const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local';
console.log("build: " + build); console.log("build: " + build);
export default { export default {
input: (build != 'test') ? 'src/demo.js' : 'test/**/*.js', input: (build != 'test') ? 'src/demo.js' : 'test/**/*.js',
output: { output: {
file: 'dist/bundle.js', file: 'dist/' + pkg.name + '.js',
format: 'esm' format: 'esm'
}, },
plugins: [ 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