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

Rename main entry point to the package name

parent 27996e4c
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-auth-src" src="bundle.js"></script> <script type="module" id="vpu-auth-src" src="vpu-auth.js"></script>
</head> </head>
<body> <body>
......
{ {
"name": "vpu-auth", "name": "vpu-auth",
"version": "1.0.0", "version": "1.0.0",
"main": "src/index.js", "main": "src/vpu-auth.js",
"devDependencies": { "devDependencies": {
"chai": "^4.2.0", "chai": "^4.2.0",
"i18next-scanner": "^2.10.2", "i18next-scanner": "^2.10.2",
......
...@@ -10,13 +10,14 @@ import url from "rollup-plugin-url"; ...@@ -10,13 +10,14 @@ import url from "rollup-plugin-url";
import consts from 'rollup-plugin-consts'; import consts from 'rollup-plugin-consts';
import del from 'rollup-plugin-delete'; import del from 'rollup-plugin-delete';
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: [
......
import './vpu-auth';
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