Skip to content

Commit

Permalink
Add dot import from node_modules test case
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Nov 12, 2020
1 parent b70f2cc commit 6f5ea7b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
public/
node_modules/
node_modules/date-fns/
assets/jsconfig.json
4 changes: 4 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ 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;
1 change: 1 addition & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<li x-text="hello3()"></li>
<li x-text="hello4()"></li>
<li x-text="hello6()"></li>
<li x-text="helloNodeModules()"></li>
<li x-text="data.Hugo"></li>
<li x-text="params.myparam"></li>
</ul>
Expand Down
5 changes: 5 additions & 0 deletions node_modules/mynodemod/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions node_modules/mynodemod/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f5ea7b

Please sign in to comment.