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

Port to use code splitting; Rename entry point to the package name

parent 04ca30c7
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" src="bundle.js"></script>
<script type="module" src="vpu-person-profile-demo.js"></script>
</head>
<body>
......
{
"element": "vpu-person-profile",
"module_src": "person-profile.js",
"module_src": "vpu-person-profile.js",
"name": {
"de": "Benutzerprofil",
"en": "User profile"
......
{
"name": "vpu-person-profile",
"version": "1.0.0",
"main": "src/index.js",
"main": "src/vpu-person-profile.js",
"devDependencies": {
"karma": "^4.2.0",
"karma-chai": "^0.1.0",
......
......@@ -14,16 +14,19 @@ const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : '
console.log("build: " + build);
export default {
input: (build != 'test') ? 'src/demo.js' : 'test/**/*.js',
input: (build != 'test') ? ['src/vpu-person-profile.js', 'src/vpu-person-profile-demo.js'] : 'test/**/*.js',
output: {
file: 'dist/bundle.js',
format: 'esm'
dir: 'dist',
entryFileNames: '[name].js',
chunkFileNames: 'shared/[name].[hash].[format].js',
format: 'esm',
sourcemap: true
},
plugins: [
del({
targets: 'dist/*'
}),
multiEntry(),
(build == 'test') ? multiEntry() : false,
consts({
environment: build,
}),
......@@ -51,6 +54,7 @@ export default {
copy({
targets: [
{src: 'assets/index.html', dest: 'dist'},
{src: 'assets/vpu-person-profile.metadata.json', dest: 'dist'},
{src: 'node_modules/vpu-common/assets/icons/*.svg', dest: 'dist/local/vpu-common/icons'},
],
}),
......
import 'vpu-auth';
import './person-profile-demo.js';
import './vpu-person-profile-demo.js';
import './person-profile.js';
import 'vpu-auth';
import {i18n} from './i18n.js';
import {css, html, LitElement} from 'lit-element';
import VPULitElement from 'vpu-common/vpu-lit-element';
import './person-profile.js';
import './vpu-person-profile.js';
import * as commonUtils from 'vpu-common/utils';
import bulmaCSSPath from "bulma/css/bulma.min.css";
import $ from 'jquery';
......
import '../src/person-profile.js';
import '../src/vpu-person-profile.js';
import '../src/demo.js';
describe('vpu-person-profile demo', () => {
......
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