Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
JavaScriptのimport/export
Search
Kazunori-Kimura
March 06, 2018
Technology
0
750
JavaScriptのimport/export
JavaScriptのimport/exportについて、CommonJS ModulesとES Modulesの違いとWebPack, Parcelの紹介
Kazunori-Kimura
March 06, 2018
Tweet
Share
More Decks by Kazunori-Kimura
See All by Kazunori-Kimura
path-parser
kazunorikimura
0
330
objectのcloneを行う/How to clone of the object in js
kazunorikimura
0
340
クライアントサイドで大きなデータを扱うときのお話/Web Worker & IndexedDB
kazunorikimura
0
590
How freelance programmer works
kazunorikimura
0
90
moment.js
kazunorikimura
0
61
sequelize.pdf
kazunorikimura
0
510
Toward the world of "ready player one"
kazunorikimura
0
63
npmの便利なパッケージ: forever, winser
kazunorikimura
0
910
npmの便利なパッケージ: Jest
kazunorikimura
0
100
Other Decks in Technology
See All in Technology
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
3
580
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
120
Emacs x Nostr
hakkadaikon
1
150
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
サイバーエージェントにおける生成AIのリスキリング施策の取り組み / cyber-ai-reskilling
cyberagentdevelopers
PRO
2
200
AIを駆使したゲーム開発戦略: 新設AI組織の取り組み / sge-ai-strategy
cyberagentdevelopers
PRO
1
130
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
320
オニオンアーキテクチャで実現した 本質課題を解決する インフラ移行の実例
hryushm
14
3k
ガバメントクラウド先行事業中間報告を読み解く
sugiim
1
1.3k
30万人が利用するチャットをFirebase Realtime DatabaseからActionCableへ移行する方法
ryosk7
5
330
Apple/Google/Amazonの決済システムの違いを踏まえた定期購読課金システムの構築 / abema-billing-system
cyberagentdevelopers
PRO
1
220
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
136
6.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Scaling GitHub
holman
458
140k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Optimizing for Happiness
mojombo
376
69k
Building an army of robots
kneath
302
42k
The World Runs on Bad Software
bkeepers
PRO
65
11k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Transcript
JavaScriptͷ import/export 2018-03-17 ଜ ݑن
ΞδΣϯμ JavaScriptͷimport/export ES Modulesͷ࣮ঢ়گ webpack4͕ϦϦʔε Parcelͷհ
ΞδΣϯμ JavaScriptͷimport/export ES Modulesͷ࣮ঢ়گ webpack4͕ϦϦʔε Parcelͷհ
ෳͷJavaScriptΛಡΈࠐΉ <html> <body> : <script src="assets/jquery.min.js"></script> <script src="assets/bootstrap.min.js"></script> <script src="app.js"></script>
</body> </html>
ෳͷJavaScriptΛಡΈࠐΉ <html> <body> : <script src="assets/jquery.min.js"></script> <script src="assets/bootstrap.min.js"></script> <script src="app.js"></script>
</body> </html> ଞݴޠͷJNQPSUJODMVEFʹ ֘͢Δػೳ͕ͳ͔ͬͨ
JavaScriptͷimport/export $PNNPO+4.PEVMFT &4.PEVMFT FYQPSUଆ YYYKT NPEVMFFYQPSUTYYY FYQPSUEFGBVMUYYY JNQPSUଆ JOEFYKT
DPOTUYYYSFRVJSF YYY JNQPSUYYYGSPNYYY
JavaScriptͷimport/export $PNNPO+4.PEVMFT &4.PEVMFT FYQPSUଆ YYYKT NPEVMFFYQPSUTYYY FYQPSUEFGBVMUYYY JNQPSUଆ JOEFYKT
DPOTUYYYSFRVJSF YYY JNQPSUYYYGSPNYYY /PEFKT αʔόʔαΠυ+4 ͷ༷
JavaScriptͷimport/export $PNNPO+4.PEVMFT &4.PEVMFT FYQPSUଆ YYYKT NPEVMFFYQPSUTYYY FYQPSUEFGBVMUYYY JNQPSUଆ JOEFYKT
DPOTUYYYSFRVJSF YYY JNQPSUYYYGSPNYYY &$."4DSJQUͷ༷
JavaScriptͷimport/export $PNNPO+4.PEVMFT &4.PEVMFT FYQPSUଆ YYYKT NPEVMFFYQPSUTYYY FYQPSUEFGBVMUYYY JNQPSUଆ JOEFYKT
DPOTUYYYSFRVJSF YYY JNQPSUYYYGSPNYYY
ΞδΣϯμ JavaScriptͷimport/export ES Modulesͷ࣮ঢ়گ webpack4͕ϦϦʔε Parcelͷհ
ϒϥβͷରԠঢ়گ JNQPSU+BWB4DSJQUc.%/ IUUQTEFWFMPQFSNP[JMMBPSHKBEPDT8FC+BWB4DSJQU3FGFSFODF 4UBUFNFOUTJNQPSU
Node.jsͰES Modules ֦ுࢠΛͯ͢ .mjs ͱ͢Δ --experimental-modulesϑϥάΛࢦఆ ͑Δ...͕ɺWarning͕දࣔ͞ΕΔ
ΞδΣϯμ JavaScriptͷimport/export ES Modulesͷ࣮ঢ়گ webpack4͕ϦϦʔε Parcelͷհ
όϯυϧπʔϧ ෳͷJavaScriptϑΝΠϧΛ ͻͱͭʹ݁߹
όϯυϧπʔϧ πʔϧ ಛ ରԠ CSPXTFSJGZ γϯϓϧ $PNNPO+4.PEVMFT XFCQBDL ଟػೳ
$PNNPO+4.PEVMFT &4.PEVMFT $44 *NBHFT
όϯυϧπʔϧ πʔϧ ಛ ରԠ CSPXTFSJGZ γϯϓϧ $PNNPO+4.PEVMFT XFCQBDL ଟػೳ
$PNNPO+4.PEVMFT &4.PEVMFT $44 *NBHFT
WebPack4͕ 2018-2-25 ʹϦϦʔε
webpack webpack4͔ΒઃఆϑΝΠϧͳ͠Ͱಈ࡞ CLIͰ͏ʹ webpack ͱ webpack-cli Λ༻
ΞδΣϯμ JavaScriptͷimport/export ES Modulesͷ࣮ঢ়گ webpack4͕ϦϦʔε Parcelͷհ
ઃఆϑΝΠϧෆཁ js,cssͳͲͷґଘؔΛ ௐࠪ͠τϥϯεύΠϧɾ όϯυϧΛߦ͏ > parcel index.html
ΞδΣϯμ JavaScriptͷimport/export ES Modulesͷ࣮ঢ়گ webpack4͕ϦϦʔε Parcelͷհ