Skip to content

Update "Order undefined error" branch to [email protected] #1

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

Open
wants to merge 43 commits into
base: order-undefined-error
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2928346
fix(symlink): node v6 symlink resolve update
May 12, 2016
12b378d
fix typo
SherylHohman May 31, 2016
2db50ee
Merge pull request #192 from SherylHohman/patch-3
sokra Jun 15, 2016
d545540
Initial WebPack 2 config
texastoland Jun 10, 2016
501ca2f
Eliminate duplication between extract functions
texastoland Jun 10, 2016
352316f
Migrate extract API
texastoland Jun 11, 2016
db1c94b
Migrate constructor API
texastoland Jun 15, 2016
4e1150b
Fix error message not updated in 7fc7957
texastoland Jun 15, 2016
ba081cc
Configure tests
texastoland Jun 16, 2016
ff42c4f
Fix half of tests
texastoland Jun 16, 2016
90889c8
Fix remaining tests
texastoland Jun 16, 2016
a12209b
Add extractAll functions
texastoland Jun 16, 2016
ffe9a6a
Pass query object with loader.js
texastoland Jun 16, 2016
b437a61
Add failing test for WebPack 2
texastoland Jun 16, 2016
f89c009
Update to WebPack 2
texastoland Jun 16, 2016
069555d
Fix #196 with passing WebPack 2 test
texastoland Jun 18, 2016
debeb10
Update README
texastoland Jun 17, 2016
f4faac7
Revert "Add extractAll functions"
texastoland Jun 18, 2016
f4c4176
Revert `extractAll` in example and README
texastoland Jun 18, 2016
8888cff
Fix error wording
texastoland Jun 18, 2016
ba0a71d
updated to new webpack chunk api
sokra Jul 13, 2016
ab2a002
2.0.0-beta.0
sokra Jul 13, 2016
dad2094
use other semver code
sokra Jul 13, 2016
d301fd0
2.0.0-beta.1
sokra Jul 13, 2016
14642a5
Merge branch '196-webpack2-query-object' of https://github.com/jane/e…
sokra Jul 15, 2016
d23f5c8
Merge branch 'jane-196-webpack2-query-object'
sokra Jul 15, 2016
b44e078
Merge branch 'master' of https://github.com/doctolib/extract-text-web…
sokra Jul 15, 2016
fa62f4b
improved PR
sokra Jul 15, 2016
d40c131
Fixes webpack/webpack#2450
sokra Jul 15, 2016
a5dc2a4
Edited .gitignore to add an "editor files" section.
RabidFX Apr 8, 2016
02d9ccf
First attempt at testing optimize-tree.
sokra Jul 15, 2016
57c3323
2.0.0-beta.2
sokra Jul 15, 2016
a1c0c37
get rid of this weird name
sokra Jul 20, 2016
2c33ab6
2.0.0-beta.3
sokra Jul 20, 2016
9830618
Link to v1's documentation from v2's README
Jul 28, 2016
2cf2e87
Merge pull request #220 from Kovensky/patch-1
sokra Jul 28, 2016
6817d29
Be more specific on the peerDependencies
Aug 1, 2016
b79da9f
Fix handling of loaders as objects without a query prop
insin Aug 17, 2016
a36dbf8
Added test case for object loader without a query
insin Aug 17, 2016
1a29dd6
Merge pull request #232 from insin/patch-1
sokra Aug 17, 2016
27e73bf
Merge pull request #223 from Kovensky/patch-2
sokra Aug 17, 2016
64ef947
Add ignoreOrder option to avoid the OrderUndefinedError
MicheleBertoli Mar 19, 2016
a12840c
Updates order-undefined-error tests to new API
grrowl Aug 31, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/node_modules

/example/assets
/test/js

/test/js
/coverage

/.idea
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# extract text plugin for webpack
# extract text plugin for webpack 2

The API has changed since version 1. For the webpack 1 version, see [the README in the webpack-1 branch](https://github.com/webpack/extract-text-webpack-plugin/blob/webpack-1/README.md).

## Usage example with css

Expand All @@ -7,7 +9,10 @@ var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
module: {
loaders: [
{ test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader") }
{ test: /\.css$/, loader: ExtractTextPlugin.extract({
fallbackLoader: "style-loader",
loader: "css-loader"
}) }
]
},
plugins: [
Expand Down Expand Up @@ -37,32 +42,30 @@ Caveats:
## API

``` javascript
new ExtractTextPlugin([id: string], filename: string, [options])
new ExtractTextPlugin(options: filename | object)
```

* `id` Unique ident for this plugin instance. (For advanded usage only, by default automatic generated)
* `filename` the filename of the result file. May contain `[name]`, `[id]` and `[contenthash]`.
* `options.filename: string` _(required)_ the filename of the result file. May contain `[name]`, `[id]` and `[contenthash]`
* `[name]` the name of the chunk
* `[id]` the number of the chunk
* `[contenthash]` a hash of the content of the extracted file
* `options`
* `allChunks` extract from all additional chunks too (by default it extracts only from the initial chunk(s))
* `disable` disables the plugin
* `options.allChunks: boolean` extract from all additional chunks too (by default it extracts only from the initial chunk(s))
* `options.disable: boolean` disables the plugin
* `options.id: string` Unique ident for this plugin instance. (For advanced usage only, by default automatically generated)

The `ExtractTextPlugin` generates an output file per entry, so you must use `[name]`, `[id]` or `[contenthash]` when using multiple entries.

``` javascript
ExtractTextPlugin.extract([notExtractLoader], loader, [options])
ExtractTextPlugin.extract(options: loader | object)
```

Creates an extracting loader from an existing loader.
Creates an extracting loader from an existing loader. Supports loaders of type `{ loader: string; query: object }`.

* `notExtractLoader` (optional) the loader(s) that should be used when the css is not extracted (i.e. in an additional chunk when `allChunks: false`)
* `loader` the loader(s) that should be used for converting the resource to a css exporting module.
* `options`
* `publicPath` override the `publicPath` setting for this loader.
* `options.loader: string | object | loader[]` _(required)_ the loader(s) that should be used for converting the resource to a css exporting module
* `options.fallbackLoader: string | object | loader[]` the loader(s) that should be used when the css is not extracted (i.e. in an additional chunk when `allChunks: false`)
* `options.publicPath: string` override the `publicPath` setting for this loader

There is also an `extract` function on the instance. You should use this if you have more than one ExtractTextPlugin.
There is also an `extract` function on the instance. You should use this if you have more than one `ExtractTextPlugin`.

```javascript
let ExtractTextPlugin = require('extract-text-webpack-plugin');
Expand All @@ -75,8 +78,8 @@ module.exports = {
...
module: {
loaders: [
{test: /\.scss$/i, loader: extractCSS.extract(['css','sass'])},
{test: /\.less$/i, loader: extractLESS.extract(['css','less'])},
{ test: /\.scss$/i, loader: extractCSS.extract(['css','sass']) },
{ test: /\.less$/i, loader: extractLESS.extract(['css','less']) },
...
]
},
Expand Down
17 changes: 8 additions & 9 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,21 @@ module.exports = {
},
module: {
loaders: [
{ test: /\.css$/, loader: ExtractTextPlugin.extract(
"style-loader",
"css-loader?sourceMap",
{
publicPath: "../"
}
)},
{ test: /\.css$/, loader: ExtractTextPlugin.extract({
notExtractLoader: "style-loader",
loader: "css-loader?sourceMap",
publicPath: "../"
}) },
{ test: /\.png$/, loader: "file-loader" }
]
},
devtool: "source-map",
plugins: [
new ExtractTextPlugin("css/[name].css?[hash]-[chunkhash]-[contenthash]-[name]", {
new ExtractTextPlugin({
filename: "css/[name].css?[hash]-[chunkhash]-[contenthash]-[name]",
disable: false,
allChunks: true
}),
new webpack.optimize.CommonsChunkPlugin("c", "c.js")
new webpack.optimize.CommonsChunkPlugin({ name: "c", filename: "c.js" })
]
};
Loading