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 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="UTF-8"> <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> <style>
body { body {
font-family: sans; font-family: sans;
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
"rollup-plugin-consts": "^1.0.1", "rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0", "rollup-plugin-copy": "^3.1.0",
"rollup-plugin-json": "^4.0.0", "rollup-plugin-json": "^4.0.0",
"rollup-plugin-multi-entry": "^2.1.0",
"rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-serve": "^1.0.1", "rollup-plugin-serve": "^1.0.1",
"rollup-plugin-url": "^2.2.2" "rollup-plugin-url": "^2.2.2"
......
import path from 'path'; import path from 'path';
import glob from 'glob';
import resolve from 'rollup-plugin-node-resolve'; import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs'; import commonjs from 'rollup-plugin-commonjs';
import multiEntry from 'rollup-plugin-multi-entry';
import copy from 'rollup-plugin-copy'; import copy from 'rollup-plugin-copy';
import serve from 'rollup-plugin-serve'; import serve from 'rollup-plugin-serve';
import consts from 'rollup-plugin-consts'; import consts from 'rollup-plugin-consts';
...@@ -14,10 +14,13 @@ const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : ' ...@@ -14,10 +14,13 @@ const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : '
console.log("build: " + build); console.log("build: " + build);
export default { export default {
input: (build !='test') ? 'demo.js' : 'test/**/*.js', input: (build !='test') ? ['demo.js'] : glob.sync('test/**/*.js'),
output: { output: {
file: 'dist/bundle.js', dir: 'dist',
format: 'esm' entryFileNames: '[name].js',
chunkFileNames: 'shared/[name].[hash].[format].js',
format: 'esm',
sourcemap: true
}, },
onwarn: function (warning, warn) { onwarn: function (warning, warn) {
// ignore chai warnings // ignore chai warnings
...@@ -30,7 +33,6 @@ export default { ...@@ -30,7 +33,6 @@ export default {
del({ del({
targets: 'dist/*' targets: 'dist/*'
}), }),
multiEntry(),
consts({ consts({
environment: build, environment: build,
}), }),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment