Skip to content

Commit

Permalink
use html-load instead of raw-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
haoliangyu committed May 3, 2017
1 parent a713881 commit 75310cd
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"css-loader": "^0.28.0",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.11.1",
"html-loader": "^0.4.5",
"html-webpack-plugin": "^2.28.0",
"less": "^2.7.2",
"less-loader": "^4.0.3",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"optimize-js-plugin": "0.0.4",
"raw-loader": "^0.5.1",
"script-ext-html-webpack-plugin": "^1.7.1",
"style-loader": "^0.16.1",
"to-string-loader": "^1.1.5",
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
rules: [
{ test: /\.ts$/, enforce: 'pre', loader: 'tslint-loader' },
{ test: /(\.component|\.service|)\.ts$/, use: ['ts-loader'] },
{ test: /\.component\.html$/, use: ['raw-loader'] },
{ test: /\.html$/, use: [{ loader: 'html-loader', options: { minimize: false } }] },
{ test: /(\.component|)\.less$/, use: ['to-string-loader', 'css-loader', 'less-loader'] },
{ test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' })},
{ test: /\.(png|gif|jpg)$/, use:[{ loader: 'file-loader', options: { name: 'images/[name].[ext]'} } ]},
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
rules: [
{ test: /\.ts$/, enforce: 'pre', loader: 'tslint-loader' },
{ test: /(\.component|\.service|)\.ts$/, use: ['ts-loader'] },
{ test: /\.component\.html$/, use: ['raw-loader'] },
{ test: /\.html$/, use: [{ loader: 'html-loader', options: { minimize: false } }] },
{ test: /(\.component|)\.less$/, use: ['to-string-loader', 'css-loader', 'less-loader'] },
{ test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' })},
{ test: /\.(png|gif|jpg)$/, use:[{ loader: 'file-loader', options: { name: 'images/[name].[ext]'} } ]},
Expand Down
50 changes: 44 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ assert@^1.1.1:
dependencies:
util "0.10.3"

[email protected]:
version "0.9.6"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.6.tgz#102c9e9e9005d3e7e3829bf0c4fa24ee862ee9b9"

async-each@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
Expand Down Expand Up @@ -858,6 +862,13 @@ error-ex@^1.2.0:
dependencies:
is-arrayish "^0.2.1"

es6-templates@^0.2.2:
version "0.2.3"
resolved "https://registry.yarnpkg.com/es6-templates/-/es6-templates-0.2.3.tgz#5cb9ac9fb1ded6eb1239342b81d792bbb4078ee4"
dependencies:
recast "~0.11.12"
through "~2.3.6"

escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
Expand All @@ -866,6 +877,10 @@ esprima@^2.6.0:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"

esprima@~3.1.0:
version "3.1.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"

estree-walker@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.0.tgz#f67ca8f57b9ed66d886af816c099c779b315d4db"
Expand Down Expand Up @@ -1162,7 +1177,17 @@ html-comment-regex@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e"

html-minifier@^3.2.3:
html-loader@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-0.4.5.tgz#5fbcd87cd63a5c49a7fce2fe56f425e05729c68c"
dependencies:
es6-templates "^0.2.2"
fastparse "^1.1.1"
html-minifier "^3.0.1"
loader-utils "^1.0.2"
object-assign "^4.1.0"

html-minifier@^3.0.1, html-minifier@^3.2.3:
version "3.3.0"
resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.3.0.tgz#a9b5b8eda501362d4c5699db02a8dc72013d1fab"
dependencies:
Expand Down Expand Up @@ -2193,6 +2218,10 @@ pretty-error@^2.0.2:
renderkid "~2.0.0"
utila "~0.4"

private@~0.1.5:
version "0.1.7"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1"

process-nextick-args@~1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
Expand Down Expand Up @@ -2267,10 +2296,6 @@ randombytes@^2.0.0, randombytes@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec"

raw-loader@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa"

rc@~1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9"
Expand Down Expand Up @@ -2337,6 +2362,15 @@ readdirp@^2.0.0:
readable-stream "^2.0.2"
set-immediate-shim "^1.0.1"

recast@~0.11.12:
version "0.11.23"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3"
dependencies:
ast-types "0.9.6"
esprima "~3.1.0"
private "~0.1.5"
source-map "~0.5.0"

rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
Expand Down Expand Up @@ -2547,7 +2581,7 @@ source-list-map@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.1.1.tgz#1a33ac210ca144d1e561f906ebccab5669ff4cb4"

[email protected], source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
[email protected], source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3:
version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"

Expand Down Expand Up @@ -2698,6 +2732,10 @@ tar@~2.2.1:
fstream "^1.0.2"
inherits "2"

through@~2.3.6:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"

timers-browserify@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86"
Expand Down

0 comments on commit 75310cd

Please sign in to comment.