Giter VIP home page Giter VIP logo

superdevstack's People

Contributors

zmrhaljiri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pavelhynek

superdevstack's Issues

Make Webpack watch files out of it's dependency graph

Watching files and making certain operations to it (after saving) could be applied also to files that are not specified in entry files or imported by files in the dependency graph.

For example, files in /api folder are not imported (so Webpack does not know about it), but it's still important to lint it on save or while running formatting NPM task.

Discover if it's possible to solve it via Webpack or some plugins. Otherwise it would be needed to implement a task runner and perhaps separate linting from Webpack - that I'd like to avoid.

What minimize plugin is the most efficient?

There are multiple plugins that can be used for JS minification. The top 3 seems to be:

Which one should be used for the best assets optimization? Compilation speed is priority number 2, of course if it would not be dramatically slower.

Some explanation: https://stackoverflow.com/questions/52661999/babel-minify-vs-terser-instead-uglify-js

Include `copy externals` as Webpack hook

The NPM script copy.externals is used to copy files from externals/ folder into the dist/ folder.

Currently, due Webpack plugin is cleaning the dist folder automatically before compilation, it's needed to exclude the externals/ folder from the plugin configuration + specify the task as a separate NPM script that's run before the NPM webpack script.

A suggestion is to use the copy task as a Webpack hook, after each compilation. More specifically, after the dist/ folder is cleaned up, copy the external files there.

Automate the version injecting workflow

The WebpackAutoInject plugin is increasing the version property in package.json.

There are 3 available options, each increasing different number:

  • Major - from 1.0.0 to 2.0.0
  • Minor - from 1.0.0 to 1.1.0
  • Patch - from 1.0.0 to 1.0.1

Currently, every time build is run, it increases the version by 1 (patch option).

Suggestion is to create an argument to the build script that would apply the specified option. Also with letting patch to by the default option.

Examples:
npm start build - default, for patch change
npm start build --env.minor - for minor change
npm start build --env.major - for major change

Integrate cache loader

Add the cache-loader plugin for caching an expensive loaders.

A proper analysis must be done, see the note from the loader documentation:

Note that there is an overhead for saving the reading and saving the cache file, so only use this loader to cache expensive loaders.

URL: https://github.com/webpack-contrib/cache-loader

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.