-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from metalabdesign/fix-source-maps
Fix previous source map not being used correctly.
- Loading branch information
Showing
10 changed files
with
145 additions
and
47 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>LESS Example</title> | ||
<link rel="stylesheet" href="./dist/styles-1.css"> | ||
<link rel="stylesheet" href="./dist/styles-2.css"> | ||
</head> | ||
<body> | ||
<div class="foo">foo</div> | ||
<div class="bar">bar</div> | ||
<div class="baz">baz</div> | ||
<div class="qux">qux</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('./index.less'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@green: green; | ||
@red: red; | ||
@yellow: yellow; | ||
@blue: blue; | ||
|
||
.foo { | ||
color: @green; | ||
} | ||
|
||
.bar { | ||
color: @red; | ||
} | ||
|
||
.baz { | ||
color: @yellow; | ||
} | ||
|
||
.qux { | ||
color: @blue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
var CSSSplitWebpackPlugin = require('../../').default; | ||
|
||
module.exports = { | ||
entry: './index.js', | ||
context: __dirname, | ||
output: { | ||
path: __dirname + '/dist', | ||
publicPath: '/foo', | ||
filename: 'bundle.js', | ||
}, | ||
module: { | ||
loaders: [{ | ||
test: /\.less$/, | ||
loader: ExtractTextPlugin.extract( | ||
'css?-url&-autoprefixer&sourceMap!less?sourceMap' | ||
), | ||
}], | ||
}, | ||
devtool: 'source-map', | ||
plugins: [ | ||
new ExtractTextPlugin("styles.css"), | ||
new CSSSplitWebpackPlugin({size: 3}), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters