-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* run optimized dependency install after build * add test runner * resolve esm imports inside of html * replace triple with tuple * update install options for more extensions
- Loading branch information
1 parent
184eeed
commit 641cc81
Showing
11 changed files
with
178 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
test/build/resolve-imports/expected-build/_dist_/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="description" content="Web site created using create-snowpack-app" /> | ||
<title>Snowpack App</title> | ||
</head> | ||
<body> | ||
<script type="module" src="/_dist_/index.js"></script> | ||
<script type="module"> | ||
// Path aliases | ||
import {flatten} from 'array-flatten'; | ||
console.log(flatten); | ||
|
||
// Importing a file | ||
import sort from './sort'; // relative import | ||
import sort_ from 'src/sort'; // bare import using mount | ||
import sort__ from 'src/sort.js'; // bare import using mount + extension | ||
console.log(sort, sort_, sort__); | ||
|
||
// Importing a directory index.js file | ||
import components from './components'; // relative import | ||
import components_ from './components/index'; // relative import with index appended | ||
import components__ from './components/index.js'; // relative import with index appended | ||
import components___ from 'src/components'; // bare import using mount | ||
import components____ from 'src/components/index'; // bare import using mount and index appended | ||
import components_____ from 'src/components/index.js'; // bare import using mount and index.js appended | ||
console.log(components, components_, components__, components___, components____, components_____); | ||
|
||
|
||
// Importing something that isn't JS | ||
import styles from './components/style.css'; // relative import | ||
import styles_ from 'src/components/style.css'; // relative import | ||
console.log(styles, styles_); | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
641cc81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: