Skip to content

Conversation

@metatoaster
Copy link
Member

Integrate the calmjs-3.3.0 loader module registries along with an extended registry class to support webpack module.rules method of defining loaders. This is still work in progress (although mostly done) as the full change is pending on the release of calmjs.dev-2.2.0 so that the test registries for loaders will be resolved correctly.

Also the changelog entry will need further completion as it is missing a few pieces of key information and notes (like the correction to the karma webpack configuration).

- Removing calmjs.parse as that is already required by calmjs.
- Require the minimum version needed for the loader registry support.
- Encapsulate the whole related process into a single method.
- Due to how the webpack specific way does conflict with the existing
  prefix based usage framework, provide a specific webpack version that
  can effect webpack specific configurations.

Commit amended to support calmjs/calmjs@20d8c2b455
- Provide the base fragments that are needed so that the pieces to
  produce the final configuration for webpack can be done.
- This is to ensure forward compatibility, and ensure that the
  loaderplugin additions do not conflict with the tests.
- Also just isolate this out to make the intent clear.
- Minor reworking of the test environment setup for webpack, and add
  comments on how/why the environment were set up like such.
- Provide a separate function to set up the style test cases.
- Add the loaderplugin filter function to the Toolchain.assemble method,
  to enable the support of prefixless imports of resources exported by
  Python packages through the WebpackModuleLoader registry
- Provide the full solution that provides the complete integration of
  webpack loader support.
- For the integration testing, make use of the calmjs.dev integration
  tests for ensuring that the styles are applied and that the additional
  module.rules does not interfere with coverage reporting (and vice
  versa).
- So that they may be used.
- Also add a note about that module name, because it might be worthwhile
  to actually allow the standard definition, i.e. defining the loader
  by the full name (e.g. style -> style-loader), so that

    [calmjs.module.webpackloader]
    style-loader!css-loader = styles[css]

  should be possible.
@metatoaster metatoaster force-pushed the loader_module branch 2 times, most recently from 5aaabc3 to 744689d Compare July 25, 2018 02:06
- Such that the correct/intended Node.js package be located, especially
  for the most explicit/correct definition using the -loader suffix.
- Fix the class typo.
- Also ensure that the coverage data get written explicitly to where the
  build directory is.
- Show that the .tests.webpackloader entries are added to the karma
  and webpack configuration correctly.
- Also do another standalone artifact test to ensure this combination is
  also supported.
- Correct the various test cases that were affected before this version.
- Also the fact that calmjs.dev-2.2.0 introduced some vital changes that
  make the usage of the testing much simpler for end users warrants this
  version bump.
@metatoaster metatoaster force-pushed the loader_module branch 3 times, most recently from 8e8ff99 to bb3f2aa Compare July 25, 2018 03:44
@metatoaster metatoaster merged commit 9248cb5 into calmjs:master Jul 25, 2018
@metatoaster metatoaster added this to the 1.1.0 milestone Jul 25, 2018
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

Successfully merging this pull request may close these issues.

1 participant