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

Configure css-loader using an object so changing the config is easier. #349

Merged
merged 2 commits into from
Sep 21, 2017
Merged

Configure css-loader using an object so changing the config is easier. #349

merged 2 commits into from
Sep 21, 2017

Conversation

molily
Copy link
Contributor

@molily molily commented Sep 3, 2017

Fixes #303.

I’ve tested it manually by adding …

	const { loader: cssLoader } =
		helpers.getLoadersByName(config, 'css-loader')[0];
	cssLoader.options.localIdentName = '[path][local]-[hash:base64:5]';

… to tests/subjects/custom-webpack/preact.config.js.

Does it make sense to add this to the test setup permanently? I would add a CSS file then to demonstrate it and update the snapshot. It would be a nice example / test for helpers.getLoadersByName as well. What do you think?

Copy link
Member

@lukeed lukeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙏 We'll get this in once #375 has landed.

I was about to implement the same changes until I saw that this PR already existed.

@lukeed lukeed added this to the 2.0 milestone Sep 18, 2017
@lukeed
Copy link
Member

lukeed commented Sep 21, 2017

Just letting it run~ Nothing changed, but better safe than sorry 😉

@lukeed lukeed merged commit 8a2dfff into preactjs:master Sep 21, 2017
developit added a commit that referenced this pull request Oct 11, 2017
* master: (166 commits)
  Use `publicPath` for SW & Manifest paths (#323)
  Purge `examples` dir (#393)
  Update Readme (#383)
  Add `preact list` command (#384)
  linters are dumb
  inject / replace strings in extracted contents
  adding flag to disable service worker
  Convert `css-loader` options to an Object (#349)
  remove `offline-plugin` (unused)
  remove `mkdirp` (unused)
  remove `less` dependencies
  fix linter
  move `htmlPlugin` to `render-html-plugin.js`
  install `css|postcss|style-loader` & regen `yarn.lock`
  remove `chunk.modules` deprecation notice
  rewrite server’s `webpack.config` without blocks
  rewrite client’s `webpack.config` without blocks
  install `webpack-merge`
  rewrite base `webpack.config` w/o blocks
  light refactor
  ...

# Conflicts:
#	src/lib/webpack/webpack-base-config.js
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.

3 participants