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

Get rid of multi-entry

Use code splitting instead
parent db22eb83
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-common-demo-src" src="bundle.js"></script>
<script type="module" id="vpu-common-demo-src" src="demo.js"></script>
<style>
body {
font-family: sans;
......
......@@ -15,7 +15,6 @@
"rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-multi-entry": "^2.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-serve": "^1.0.1",
"rollup-plugin-url": "^2.2.2"
......
import path from 'path';
import glob from 'glob';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import multiEntry from 'rollup-plugin-multi-entry';
import copy from 'rollup-plugin-copy';
import serve from 'rollup-plugin-serve';
import consts from 'rollup-plugin-consts';
......@@ -14,11 +14,14 @@ const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : '
console.log("build: " + build);
export default {
input: (build !='test') ? 'demo.js' : 'test/**/*.js',
input: (build !='test') ? ['demo.js'] : glob.sync('test/**/*.js'),
output: {
file: 'dist/bundle.js',
format: 'esm'
},
dir: 'dist',
entryFileNames: '[name].js',
chunkFileNames: 'shared/[name].[hash].[format].js',
format: 'esm',
sourcemap: true
},
onwarn: function (warning, warn) {
// ignore chai warnings
if (warning.code === 'CIRCULAR_DEPENDENCY') {
......@@ -30,7 +33,6 @@ export default {
del({
targets: 'dist/*'
}),
multiEntry(),
consts({
environment: build,
}),
......
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