Skip to content

Commit 0adf25f

Browse files
committed
Merge branch 'release/1.1.1'
2 parents 8dc8492 + 36cd820 commit 0adf25f

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Annotated webpack 4 config changelog
22

3+
## 1.1.1 - 2019-06-05
4+
### Changed
5+
* Use destructuring for ESM module imports
6+
* Added `module.hot.accept()` to the example entry point `app.js`
7+
38
## 1.1.0 - 2019-05-31
49
### Changed
510
* Switched over to using `webpack-dashboard` `^3.0.0`

src/js/app.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
// Import our CSS
12
import styles from '../css/app.pcss';
23

34
// App main
45
const main = async () => {
5-
// Import our CSS
6-
//const Styles = await import(/* webpackChunkName: "styles" */ '../css/app.pcss');
76
// Async load the vue module
8-
const Vue = await import(/* webpackChunkName: "vue" */ 'vue');
7+
const { default: Vue } = await import(/* webpackChunkName: "vue" */ 'vue');
98
// Create our vue instance
10-
const vm = new Vue.default({
9+
const vm = new Vue({
1110
el: "#app",
1211
components: {
1312
'confetti': () => import(/* webpackChunkName: "confetti" */ '../vue/Confetti.vue'),
@@ -19,7 +18,15 @@ const main = async () => {
1918
mounted() {
2019
},
2120
});
21+
22+
return vm;
2223
};
24+
2325
// Execute async function
24-
main().then( (value) => {
26+
main().then( (vm) => {
2527
});
28+
29+
// Accept HMR as per: https://webpack.js.org/api/hot-module-replacement#accept
30+
if (module.hot) {
31+
module.hot.accept();
32+
}

0 commit comments

Comments
 (0)