Leave a reminder about parcel's code splitting

This commit is contained in:
Robbie Antenesse 2019-05-04 00:51:44 -06:00
parent 97677244f5
commit f5a454571b
3 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,8 @@
"author": "Robbie Antenesse <dev@alamantus.com>",
"license": "UNLICENCED",
"scripts": {
"start": "parcel index.html"
"start": "parcel index.html",
"bundle": "parcel build index.html"
},
"devDependencies": {
"parcel-bundler": "^1.12.3",

View File

@ -18,6 +18,10 @@ function setupDetailsTabs() {
const section = tab.innerText.toLowerCase();
if (section === 'edit') {
openEditModal();
// import('../test.js').then(function (test) {
// // Render page
// test.aaa();
// });
} else {
const isActive = tab.classList.contains('active');
tabs.forEach(t => t.classList.remove('active'));

2
src/test.js Normal file
View File

@ -0,0 +1,2 @@
// https://parceljs.org/code_splitting.html
export function aaa () {console.log('aaa');};