Last active
August 28, 2021 15:26
-
-
Save iOliverNguyen/e9729d550cb5c2e023ed0c1f8290978f to your computer and use it in GitHub Desktop.
code sample for https://olvrng.github.io/w/esm
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>My little app</title> | |
</head> | |
<body> | |
<script type="module" src="myscript.js"></script> | |
</body> | |
</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
import {snakeCase} from 'lodash'; | |
const words: string[] = ['HelloWorld', 'left pad', 'ECMAScript']; | |
words.forEach(text => { | |
console.log(snakeCase(text)); | |
}); |
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
// Snowpack Configuration File | |
// See all supported options: https://www.snowpack.dev/reference/configuration | |
/** @type {import("snowpack").SnowpackUserConfig } */ | |
module.exports = { | |
mount: { | |
/* ... */ | |
}, | |
plugins: [ | |
/* ... */ | |
], | |
packageOptions: { | |
source: 'remote', // the only line you need | |
}, | |
devOptions: { | |
/* ... */ | |
}, | |
buildOptions: { | |
/* ... */ | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment