1
0
Fork 0

Client: fix prod build process

This commit is contained in:
Chocobozzz 2016-09-19 22:27:17 +02:00
parent d268c551cc
commit ad22074a78
5 changed files with 182 additions and 187 deletions

View File

@ -142,15 +142,11 @@ module.exports = function (options) {
}, },
{ {
test: /\.scss$/, test: /\.(sass|scss)$/,
exclude: /node_modules/, loaders: ['css-to-string-loader', 'css-loader?sourceMap', 'resolve-url', 'sass-loader?sourceMap']
loaders: [ 'raw-loader', 'sass-loader' ]
},
{
test: /\.(woff2?|ttf|eot|svg)$/,
loader: 'url?limit=10000&name=assets/fonts/[hash].[ext]'
}, },
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url?limit=10000&minetype=application/font-woff' },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file' },
/* Raw loader support for *.html /* Raw loader support for *.html
* Returns file content as string * Returns file content as string

View File

@ -30,7 +30,8 @@ const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, {
HMR: false HMR: false
}) })
module.exports = webpackMerge(commonConfig, { module.exports = function (env) {
return webpackMerge(commonConfig({env: ENV}), {
/** /**
* Switch loaders to debug mode. * Switch loaders to debug mode.
* *
@ -228,3 +229,4 @@ module.exports = webpackMerge(commonConfig, {
} }
}) })
}

View File

@ -43,6 +43,7 @@
"copy-webpack-plugin": "^3.0.1", "copy-webpack-plugin": "^3.0.1",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"css-loader": "^0.25.0", "css-loader": "^0.25.0",
"css-to-string-loader": "^0.1.1",
"es6-promise": "^3.0.2", "es6-promise": "^3.0.2",
"es6-promise-loader": "^1.0.1", "es6-promise-loader": "^1.0.1",
"es6-shim": "^0.35.0", "es6-shim": "^0.35.0",
@ -53,13 +54,13 @@
"json-loader": "^0.5.4", "json-loader": "^0.5.4",
"ng2-bootstrap": "^1.1.5", "ng2-bootstrap": "^1.1.5",
"ng2-file-upload": "^1.0.3", "ng2-file-upload": "^1.0.3",
"node-sass": "^3.7.0", "node-sass": "^3.10.0",
"normalize.css": "^4.1.1", "normalize.css": "^4.1.1",
"raw-loader": "^0.5.1", "raw-loader": "^0.5.1",
"reflect-metadata": "0.1.3", "reflect-metadata": "0.1.3",
"resolve-url-loader": "^1.4.3", "resolve-url-loader": "^1.6.0",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",
"sass-loader": "^3.2.0", "sass-loader": "^3.2.3",
"source-map-loader": "^0.1.5", "source-map-loader": "^0.1.5",
"string-replace-loader": "^1.0.3", "string-replace-loader": "^1.0.3",
"style-loader": "^0.13.1", "style-loader": "^0.13.1",

View File

@ -17,11 +17,7 @@
"es6" "es6"
], ],
"types": [ "types": [
"hammerjs",
"jasmine",
"node", "node",
"protractor",
"selenium-webdriver",
"source-map", "source-map",
"uglify-js", "uglify-js",
"webpack" "webpack"

View File

@ -2,4 +2,4 @@
cd client || exit -1 cd client || exit -1
npm run webpack -- --config config/webpack.prod.js --progress --profile --colors --display-error-details --display-cached --bail npm run webpack -- --config config/webpack.prod.js --progress --profile --bail