mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Move node_path variables to jest config
Fix webpack using the wrong url-loader
This commit is contained in:
parent
0925b3c578
commit
c12fd48117
@ -26,7 +26,6 @@ require('expose?ReactRouterRedux!react-router-redux');
|
||||
require('expose?ReactBootstrap!react-bootstrap-ss');
|
||||
require('expose?ReactAddonsCssTransitionGroup!react-addons-css-transition-group');
|
||||
require('expose?ReactAddonsTestUtils!react-addons-test-utils');
|
||||
require('expose?QueryString!query-string');
|
||||
require('expose?Page!page.js');
|
||||
require('expose?BootstrapCollapse!bootstrap/dist/js/umd/collapse.js');
|
||||
require('expose?validator!validator');
|
||||
|
10
package.json
10
package.json
@ -7,13 +7,13 @@
|
||||
"test": "tests"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^6.10.0"
|
||||
"node": "^6.x"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack --bail --progress",
|
||||
"watch": "webpack --progress --config ./webpack-dev.config.js --watch",
|
||||
"css": "WEBPACK_CHILD=css webpack",
|
||||
"test": "NODE_PATH=\"./client/src:./admin/client/src\" jest",
|
||||
"test": "jest",
|
||||
"coverage": "NODE_PATH=\"./client/src:./admin/client/src\" jest --coverage",
|
||||
"lint": "eslint client/src && eslint admin/client/src && sass-lint -v"
|
||||
},
|
||||
@ -92,7 +92,7 @@
|
||||
"sass-lint": "^1.9.1",
|
||||
"sass-loader": "^4.0.0",
|
||||
"script-loader": "^0.7.0",
|
||||
"url-loader": "^0.5.7",
|
||||
"url-loader": "^0.5.8",
|
||||
"webpack": "^1.13.2"
|
||||
},
|
||||
"jest": {
|
||||
@ -100,6 +100,10 @@
|
||||
"admin/client/src",
|
||||
"client/src"
|
||||
],
|
||||
"modulePaths": [
|
||||
"admin/client/src",
|
||||
"client/src"
|
||||
],
|
||||
"testMatch": [
|
||||
"**/tests/**/*-test.js?(x)"
|
||||
],
|
||||
|
@ -74,7 +74,7 @@ const config = [
|
||||
'graphql-fragments': 'GraphQLFragments',
|
||||
'graphql-tag': 'GraphQLTag',
|
||||
i18n: 'i18n',
|
||||
jQuery: 'jQuery',
|
||||
jquery: 'jQuery',
|
||||
'lib/Backend': 'Backend',
|
||||
'lib/ReducerRegister': 'ReducerRegister',
|
||||
'lib/ReactRouteRegister': 'ReactRouteRegister',
|
||||
@ -117,8 +117,8 @@ const config = [
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
jQuery: 'jQuery',
|
||||
$: 'jQuery',
|
||||
jQuery: 'jquery',
|
||||
$: 'jquery',
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env':{
|
||||
@ -145,13 +145,6 @@ const config = [
|
||||
name: 'vendor',
|
||||
minChunks: Infinity,
|
||||
}),
|
||||
// Most vendor libs are loaded directly into the 'vendor' bundle (through require()
|
||||
// calls in vendor.js). This ensures that any further require() calls in other
|
||||
// bundles aren't duplicating libs.
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'vendor',
|
||||
minChunks: Infinity,
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -233,7 +226,7 @@ const config = [
|
||||
{
|
||||
test: /\.(png|gif|jpg|svg)$/,
|
||||
exclude: /fonts\/([\w_-]+)\.svg$/,
|
||||
loader: 'url?limit=10000&name=../images/[name].[ext]',
|
||||
loader: `url-loader?limit=10000&name=../images/[name].[ext]`,
|
||||
},
|
||||
{
|
||||
test: /fonts\/([\w_-]+)\.(woff|eot|ttf|svg)$/,
|
||||
|
16
yarn.lock
16
yarn.lock
@ -4749,20 +4749,20 @@ urix@^0.1.0, urix@~0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
|
||||
|
||||
url-loader@^0.5.7:
|
||||
version "0.5.8"
|
||||
resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.8.tgz#b9183b1801e0f847718673673040bc9dc1c715c5"
|
||||
dependencies:
|
||||
loader-utils "^1.0.2"
|
||||
mime "1.3.x"
|
||||
|
||||
url@^0.11.0:
|
||||
url, url@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
|
||||
dependencies:
|
||||
punycode "1.3.2"
|
||||
querystring "0.2.0"
|
||||
|
||||
url-loader:
|
||||
version "0.5.8"
|
||||
resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.8.tgz#b9183b1801e0f847718673673040bc9dc1c715c5"
|
||||
dependencies:
|
||||
loader-utils "^1.0.2"
|
||||
mime "1.3.x"
|
||||
|
||||
user-home@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f"
|
||||
|
Loading…
x
Reference in New Issue
Block a user