Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

update webpack and babel #2694

Closed
mojoaxel opened this issue Feb 8, 2017 · 13 comments
Closed

update webpack and babel #2694

mojoaxel opened this issue Feb 8, 2017 · 13 comments
Assignees

Comments

@mojoaxel
Copy link
Member

mojoaxel commented Feb 8, 2017

We should change the build process to leverage the new features introduced in webpack v2

@AoDev
Copy link
Contributor

AoDev commented Feb 14, 2017

Would you ditch gulp? it seems rather useless when you have webpack + npm.

@mojoaxel
Copy link
Member Author

Would you ditch gulp?

With gulp everything is in one place at the moment. I have no problem replacing gulp with some nice well-structured npm-scripts, but I'm not investing time in this at the moment.

@primozs
Copy link

primozs commented Feb 20, 2017

I had no issues with webpack2 versions:

    "webpack": "2.1.0-beta.27",
    "webpack-dev-server": "v2.1.0-beta.12",

Now with

    "webpack": "^2.2.1",
    "webpack-dev-server": "^2.4.1",

I am having same problems related to this webpack/webpack#4039
I made simple example if somebody has any idea what could be the problem.

error:

Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
    at Object.eval (ItemSet.js:2296)
    at eval (ItemSet.js:2298)
    at Object.../node_modules/vis/lib/timeline/component/ItemSet.js

example:
https://github.com/primozs/vis-example-webpack2

@mojoaxel
Copy link
Member Author

I made simple example if somebody has any idea what could be the problem.

Thanks!! I'll check it out after the next release.

mojoaxel added a commit that referenced this issue Feb 25, 2017
@mojoaxel
Copy link
Member Author

I've created a branch webpack2. The vis.js build works but shows a deprecation warning at the moment. We should wait until this warning is resolved to prevent tons of bug-reports.

(node:21441) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.

We should monitor the following issues and wait until they are fixed: babel/babel-loader#391 and babel/babel-loader#392

@mojoaxel
Copy link
Member Author

By the way the vis.js filesize changed with webpack 2 from 1722353 to 1623284 what is an reduction of 100k or -6%.
And I'm sure there is still room for optimization.

@AoDev
Copy link
Contributor

AoDev commented Mar 30, 2017

Hi, please have a look at this issue, which is related: #2934

@primozs primozs mentioned this issue Apr 13, 2017
@wimrijnders
Copy link
Contributor

With #3262, webpack v2.0.0 has been added to package.json and will be enabled next release.

The depreciation warning mentioned above has been examined and deemed harmless, see the discussion in #3262.

For all intents and purposes, current issue has been resolved and I am therefore closing it.

@mojoaxel
Copy link
Member Author

Thanks @wimrijnders
We should propably update webpack to a even more recent minor version and also update the webpack-config and babel-plugins.
See 8ea9906

@mojoaxel mojoaxel reopened this Jul 24, 2017
@mojoaxel mojoaxel changed the title use webpack v2 update webpack and babel Jul 24, 2017
@mojoaxel mojoaxel assigned mojoaxel and unassigned mojoaxel Jul 24, 2017
@wimrijnders
Copy link
Contributor

wimrijnders commented Jul 24, 2017

OK, will scan all modules for latest stable versions.

I indeed did the minimal updates necessary for other issues to get a working setup. Might as well go all the way.

@mojoaxel
Copy link
Member Author

mojoaxel commented Jul 27, 2017

@wimrijnders The webpack syntax changed a little since webpack 2. Be aware!

@wimrijnders
Copy link
Contributor

@mojoaxel I already fixed the syntax. All works fine right now.

mojoaxel added a commit that referenced this issue Oct 2, 2017
@mojoaxel
Copy link
Member Author

mojoaxel commented Oct 2, 2017

LGTM

@mojoaxel mojoaxel closed this as completed Oct 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants