Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jun 5, 2019
2 parents 8dc8492 + 36cd820 commit 0adf25f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Annotated webpack 4 config changelog

## 1.1.1 - 2019-06-05
### Changed
* Use destructuring for ESM module imports
* Added `module.hot.accept()` to the example entry point `app.js`

## 1.1.0 - 2019-05-31
### Changed
* Switched over to using `webpack-dashboard` `^3.0.0`
Expand Down
17 changes: 12 additions & 5 deletions src/js/app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Import our CSS
import styles from '../css/app.pcss';

// App main
const main = async () => {
// Import our CSS
//const Styles = await import(/* webpackChunkName: "styles" */ '../css/app.pcss');
// Async load the vue module
const Vue = await import(/* webpackChunkName: "vue" */ 'vue');
const { default: Vue } = await import(/* webpackChunkName: "vue" */ 'vue');
// Create our vue instance
const vm = new Vue.default({
const vm = new Vue({
el: "#app",
components: {
'confetti': () => import(/* webpackChunkName: "confetti" */ '../vue/Confetti.vue'),
Expand All @@ -19,7 +18,15 @@ const main = async () => {
mounted() {
},
});

return vm;
};

// Execute async function
main().then( (value) => {
main().then( (vm) => {
});

// Accept HMR as per: https://webpack.js.org/api/hot-module-replacement#accept
if (module.hot) {
module.hot.accept();
}

0 comments on commit 0adf25f

Please sign in to comment.