Skip to content

Commit

Permalink
Fix warnings related to extracted styles
Browse files Browse the repository at this point in the history
  • Loading branch information
constgen committed Sep 7, 2020
1 parent c41faf8 commit 3e58bc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
let path = require('path');
let fs = require('fs');

let deepmerge = require('deepmerge');
let less = require('neutrino-middleware-less-loader');
let sass = require('neutrino-middleware-sass-loader');
let deepmerge = require('deepmerge');
let web = require('@neutrinojs/web');
let vue = require('@constgen/neutrino-vue-loader');
let image = require('@constgen/neutrino-image-loader');
Expand Down Expand Up @@ -140,6 +140,16 @@ module.exports = function (customSettings = {}) {
})
.end()
.end()
.when(neutrino.config.module.rule('style').oneOf('normal').uses.get('extract'), function (module) {
module
.rule('style')
.oneOf('normal')
.use('extract')
.tap((options = {}) => deepmerge(options, { esModule: false }))
.end()
.end()
.end();
})
.end()
.when(neutrino.config.plugins.get('extract'), function (config) {
config.plugin('extract')
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/pug-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function () {
.rule('pug')
.test(/\.pug$/)
.oneOf('pug-vue') // this applies to `<template lang="pug">` in Vue components
.resourceQuery(/vue/)
.resourceQuery(/^\?vue/)
.use('pug-loader')
.loader(require.resolve('pug-plain-loader'))
.end()
Expand Down

0 comments on commit 3e58bc5

Please sign in to comment.