Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Webpack 4 #54

Closed
heathharrelson opened this issue Jul 13, 2018 · 1 comment
Closed

Upgrade to Webpack 4 #54

heathharrelson opened this issue Jul 13, 2018 · 1 comment

Comments

@heathharrelson
Copy link
Member

Webpack 4 was released in February, and Vizr is still using 3.8.x.

@heathharrelson
Copy link
Member Author

Unfortunately, it looks like this won't be 100% straightforward.

Vizr uses extract-text-webpack-plugin to bundle the CSS file, which seems to have issues (webpack-contrib/extract-text-webpack-plugin#701). Either use extract-text-webpack-plugin@next or switch to mini-css-extract-plugin.

After working around extract-text-webpack-plugin, the build throws an error trying to import the PNG image for the example chart. Possibly an issue with configuration for file-loader or vue-loader. The error reported is:

ERROR in ./lib/vizr_example.png
Module build failed (from ./node_modules/file-loader/dist/cjs.js):
TypeError: Cannot read property 'context' of undefined
    at Object.loader (/Users/harrelst/Development/vizr/REDCap-Vizr/node_modules/file-loader/dist/index.js:34:49)
 @ ./js/components/ExampleChart.vue?vue&type=script&lang=js (./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib??vue-loader-options!./js/components/ExampleChart.vue?vue&type=script&lang=js) 7:20-57
 @ ./js/components/ExampleChart.vue?vue&type=script&lang=js
 @ ./js/components/ExampleChart.vue
 @ ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib??vue-loader-options!./js/components/Vizr.vue?vue&type=script&lang=js
 @ ./js/components/Vizr.vue?vue&type=script&lang=js
 @ ./js/components/Vizr.vue
 @ ./js/main.js
 @ multi ./js/main.js

heathharrelson added a commit that referenced this issue Nov 21, 2018
Upgrade to Webpack 4 and address incompatible plugin. Fixes #54.
heathharrelson added a commit that referenced this issue Nov 21, 2018
Upgrade to Webpack 4 and address incompatible plugin. Fixes #54.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant