Skip to content

Commit 4319fe9

Browse files
committed
Sourcemaps in production is A-OK, add demo link to readme.
1 parent d532c17 commit 4319fe9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Preact Boilerplate / Starter Kit
22

3-
> :guitar: Ready-to-rock [webpack]-powered [Preact] starter project.
3+
> :guitar: Ready-to-rock [Preact] starter project, powered by [webpack].
44
>
55
> :rocket: If you're starting a new project using [Preact], you've come to the right place.
66
> Below is a step-by-step guide that takes you straight from downloading this boilerplate to production.
@@ -12,6 +12,9 @@
1212
> - [License](#license)
1313
1414

15+
**[:boom: View Demo :boom:](https://preact-boilerplate.surge.sh)**
16+
17+
1518
## Installation
1619

1720
**1. Clone this repo:**

webpack.config.babel.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import HtmlWebpackPlugin from 'html-webpack-plugin';
44
import autoprefixer from 'autoprefixer';
55

66
const ENV = process.env.NODE_ENV || 'development';
7-
const MAP = ENV==='production' ? '' : '?sourceMap';
87

98
module.exports = {
109
entry: './src/index.js',
@@ -48,15 +47,15 @@ module.exports = {
4847
test: /\.(less|css)$/,
4948
include: /src\/components\//,
5049
loader: ExtractTextPlugin.extract([
51-
`css${MAP||'?'}&modules&importLoaders=1&localIdentName=[local]${process.env.CSS_MODULES_IDENT || '_[hash:base64:5]'}`,
50+
`css?sourceMap&modules&importLoaders=1&localIdentName=[local]${process.env.CSS_MODULES_IDENT || '_[hash:base64:5]'}`,
5251
'postcss',
53-
`less${MAP}`
52+
'less?sourceMap'
5453
].join('!'))
5554
},
5655
{
5756
test: /\.(less|css)$/,
5857
exclude: /src\/components\//,
59-
loader: ExtractTextPlugin.extract(`css${MAP}!postcss!less${MAP}`)
58+
loader: ExtractTextPlugin.extract('css?sourceMap!postcss!less?sourceMap')
6059
},
6160
{
6261
test: /\.json$/,

0 commit comments

Comments
 (0)