Use react for development for the great error messages, preact for bundling for production
This commit is contained in:
parent
984c8bac3d
commit
ce484c670a
|
@ -63,6 +63,7 @@ const loaders = [
|
||||||
{ test: /\.svg$/, loader: 'svg-url-loader' }
|
{ test: /\.svg$/, loader: 'svg-url-loader' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// TODO: see if preact can give the same sort of errors and warnings as react does, if so switch to preact for development too
|
||||||
const resolve = {
|
const resolve = {
|
||||||
'alias': {
|
'alias': {
|
||||||
'react': 'preact-compat',
|
'react': 'preact-compat',
|
||||||
|
@ -89,7 +90,7 @@ const compiler = webpack({
|
||||||
module: {
|
module: {
|
||||||
loaders
|
loaders
|
||||||
},
|
},
|
||||||
resolve
|
resolve: WATCHING ? null : resolve
|
||||||
})
|
})
|
||||||
|
|
||||||
// create a single instance of the compiler to allow caching
|
// create a single instance of the compiler to allow caching
|
||||||
|
@ -114,7 +115,7 @@ const compilerMinimalist = webpack({
|
||||||
module: {
|
module: {
|
||||||
loaders
|
loaders
|
||||||
},
|
},
|
||||||
resolve
|
resolve: WATCHING ? null : resolve
|
||||||
})
|
})
|
||||||
|
|
||||||
const externals = {
|
const externals = {
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
"javascript-natural-sort": "0.7.1",
|
"javascript-natural-sort": "0.7.1",
|
||||||
"lodash": "4.17.4",
|
"lodash": "4.17.4",
|
||||||
"preact": "7.1.0",
|
"preact": "7.1.0",
|
||||||
"preact-compat": "3.9.4"
|
"preact-compat": "3.9.4",
|
||||||
|
"react": "15.4.1",
|
||||||
|
"react-dom": "15.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "0.17.0",
|
"ava": "0.17.0",
|
||||||
|
|
Loading…
Reference in New Issue