nav tabs on admin dashboard
This commit is contained in:
42
node_modules/extract-text-webpack-plugin/README.md
generated
vendored
42
node_modules/extract-text-webpack-plugin/README.md
generated
vendored
@@ -72,7 +72,7 @@ new ExtractTextPlugin(options: filename | object)
|
||||
|:--:|:--:|:----------|
|
||||
|**`id`**|`{String}`|Unique ident for this plugin instance. (For advanced usage only, by default automatically generated)|
|
||||
|**`filename`**|`{String\|Function}`|Name of the result file. May contain `[name]`, `[id]` and `[contenthash]`|
|
||||
|**`allChunks`**|`{Boolean}`|Extract from all additional chunks too (by default it extracts only from the initial chunk(s))<br />When using `CommonsChunkPlugin` and there are extracted chunks (from `ExtractTextPlugin.extract`) in the commons chunk, `allChunks` **must** be set to `true`|
|
||||
|**`allChunks`**|`{Boolean}`|Extract from all additional chunks too (by default it extracts only from the initial chunk(s))<br />When using `optimization.splitChunks` and there are extracted chunks (from `ExtractTextPlugin.extract`) in the commons chunk, `allChunks` **must** be set to `true`|
|
||||
|**`disable`**|`{Boolean}`|Disables the plugin|
|
||||
|**`ignoreOrder`**|`{Boolean}`|Disables order check (useful for CSS Modules!), `false` by default|
|
||||
|
||||
@@ -146,7 +146,6 @@ module.exports = {
|
||||
test: /\.scss$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
//resolve-url-loader may be chained before sass-loader if necessary
|
||||
use: ['css-loader', 'sass-loader']
|
||||
})
|
||||
}
|
||||
@@ -162,6 +161,45 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
### `url()` Resolving
|
||||
|
||||
If you are finding that urls are not resolving properly when you run webpack. You can expand your loader functionality with options. The `url: false` property allows your paths resolved without any changes.
|
||||
|
||||
```js
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
use: [
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
// If you are having trouble with urls not resolving add this setting.
|
||||
// See https://github.com/webpack-contrib/css-loader#url
|
||||
url: false,
|
||||
minimize: true,
|
||||
sourceMap: true
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Modify filename
|
||||
|
||||
`filename` parameter could be `Function`. It passes `getPath` to process the format like `css/[name].css` and returns the real file name, `css/js/a.css`. You can replace `css/js` with `css` then you will get the new path `css/a.css`.
|
||||
|
||||
Reference in New Issue
Block a user