Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.js « js « assets - github.com/gohugoio/hugoTestProjectJSModImports.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ac34ac927efcb147c0cf9f8a0e86ad19a6eefd26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//// From mod1, but hello1 get its data from mod2.
import { hello1, hello2 } from 'core/util';
// From mod2
import * as data from 'core/util/data.json';
// hello3, hello6 lives in mod2 which also have a index.js in util.
// But doing import from 'core/util' you will get the index.js file from mod1
// (higher up in the import list), so we need to be explicit:
import { hello3, hello6 } from 'core/util/hello3';

// From main
import { hello4 } from './lib';
// From the Hugo template.
import * as params from '@params';

// https://github.com/gohugoio/hugo/issues/7948
import { helloNodeModules } from 'mynodemod';

window.hello1 = hello1;
window.hello2 = hello2;
window.hello3 = hello3;
window.hello4 = hello4;
window.hello6 = hello6;
window.helloNodeModules = helloNodeModules;
window.data = data;
window.params = params;