mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +03:00
Update webpack to latest beta
This commit is contained in:
parent
546fccb796
commit
f02a23b280
|
@ -9,12 +9,9 @@ const IS_PRODUCTION = process.env.NODE_ENV === "production";
|
|||
module.exports = {
|
||||
context: root(),
|
||||
devtool: 'source-map',
|
||||
debug: false,
|
||||
|
||||
resolve: {
|
||||
extensions: ['', '.ts', '.js', '.json', '.css'],
|
||||
root: root('lib'),
|
||||
modulesDirectories: ['node_modules'],
|
||||
extensions: ['.ts', '.js', '.json', '.css'],
|
||||
alias: {
|
||||
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
||||
http: 'stream-http',
|
||||
|
@ -28,7 +25,7 @@ module.exports = {
|
|||
node: {
|
||||
fs: "empty",
|
||||
crypto: "empty",
|
||||
global: "window",
|
||||
global: true,
|
||||
process: true,
|
||||
module: false,
|
||||
clearImmediate: false,
|
||||
|
@ -58,29 +55,29 @@ module.exports = {
|
|||
},
|
||||
|
||||
module: {
|
||||
preLoaders: [{
|
||||
loaders: [{
|
||||
enforce: 'pre',
|
||||
test: /\.js$/,
|
||||
loader: 'source-map-loader',
|
||||
exclude: [
|
||||
/node_modules/
|
||||
]
|
||||
}],
|
||||
loaders: [{
|
||||
}, {
|
||||
test: /\.ts$/,
|
||||
loaders: [
|
||||
'awesome-typescript-loader',
|
||||
'angular2-template-loader'
|
||||
],
|
||||
exclude: [/\.(spec|e2e)\.ts$/]
|
||||
},{
|
||||
}, {
|
||||
test: /lib\/.*\.css$/,
|
||||
loaders: ['raw-loader'],
|
||||
exclude: [/redoc-initial-styles\.css$/]
|
||||
},{
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loaders: ['style', 'css?-import'],
|
||||
exclude: [/lib\/(?!.*redoc-initial-styles).*\.css$/]
|
||||
},{
|
||||
}, {
|
||||
test: /\.html$/,
|
||||
loader: 'raw-loader'
|
||||
}]
|
||||
|
|
|
@ -15,9 +15,7 @@ module.exports = {
|
|||
devtool: 'source-map',
|
||||
|
||||
resolve: {
|
||||
extensions: ['', '.ts', '.js', '.json', '.css'],
|
||||
root: root('lib'),
|
||||
modulesDirectories: ['node_modules'],
|
||||
extensions: ['.ts', '.js', '.json', '.css'],
|
||||
alias: {
|
||||
http: 'stream-http',
|
||||
https: 'stream-http'
|
||||
|
@ -30,7 +28,7 @@ module.exports = {
|
|||
node: {
|
||||
fs: "empty",
|
||||
crypto: "empty",
|
||||
global: "window",
|
||||
global: true,
|
||||
process: true,
|
||||
module: false,
|
||||
clearImmediate: false,
|
||||
|
@ -50,14 +48,14 @@ module.exports = {
|
|||
},
|
||||
|
||||
module: {
|
||||
preLoaders: [{
|
||||
loaders: [{
|
||||
enforce: 'pre',
|
||||
test: /\.js$/,
|
||||
loader: 'source-map-loader',
|
||||
exclude: [
|
||||
/node_modules/
|
||||
]
|
||||
}],
|
||||
loaders: [{
|
||||
},{
|
||||
test: /\.ts$/,
|
||||
loader: 'awesome-typescript-loader',
|
||||
exclude: /(node_modules)/
|
||||
|
|
|
@ -8,9 +8,7 @@ module.exports = {
|
|||
|
||||
devtool: 'inline-source-map',
|
||||
resolve: {
|
||||
extensions: ['', '.ts', '.js', '.json', '.css'],
|
||||
root: root('lib'),
|
||||
modulesDirectories: ['node_modules'],
|
||||
extensions: ['.ts', '.js', '.json', '.css'],
|
||||
alias: {
|
||||
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
||||
http: 'stream-http',
|
||||
|
@ -24,7 +22,7 @@ module.exports = {
|
|||
node: {
|
||||
fs: "empty",
|
||||
crypto: "empty",
|
||||
global: "window",
|
||||
global: true,
|
||||
process: true,
|
||||
module: false,
|
||||
clearImmediate: false,
|
||||
|
@ -39,60 +37,50 @@ module.exports = {
|
|||
},
|
||||
|
||||
module: {
|
||||
preLoaders: [{
|
||||
rules: [{
|
||||
enforce: 'pre',
|
||||
test: /\.js$/,
|
||||
loader: 'source-map-loader',
|
||||
exclude: [
|
||||
/node_modules/
|
||||
]
|
||||
}],
|
||||
loaders: [ {
|
||||
},{
|
||||
test: /\.ts$/,
|
||||
loaders: [
|
||||
'awesome-typescript-loader'
|
||||
],
|
||||
query: {
|
||||
"sourceMap": false,
|
||||
"inlineSourceMap": true,
|
||||
"removeComments": true,
|
||||
"module": "commonjs"
|
||||
}
|
||||
]
|
||||
}, {
|
||||
test: /\.ts$/,
|
||||
loaders: [
|
||||
'angular2-template-loader'
|
||||
],
|
||||
exclude: [/\.(spec|e2e)\.ts$/]
|
||||
},{
|
||||
}, {
|
||||
test: /lib\/.*\.css$/,
|
||||
loaders: ['raw-loader'],
|
||||
exclude: [/redoc-initial-styles\.css$/]
|
||||
},{
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loaders: ['style', 'css?-import'],
|
||||
exclude: [/lib\/(?!.*redoc-initial-styles).*\.css$/]
|
||||
},{
|
||||
}, {
|
||||
test: /\.html$/,
|
||||
loader: 'raw-loader'
|
||||
}],
|
||||
postLoaders: [
|
||||
|
||||
}, {
|
||||
/**
|
||||
* Instruments JS files with Istanbul for subsequent code coverage reporting.
|
||||
* Instrument only testing sources.
|
||||
*
|
||||
* See: https://github.com/deepsweet/istanbul-instrumenter-loader
|
||||
*/
|
||||
{
|
||||
enforce: 'post',
|
||||
test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader',
|
||||
include: root('lib'),
|
||||
exclude: [
|
||||
/\.(e2e|spec)\.ts$/,
|
||||
/node_modules/
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
}]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
|
@ -100,6 +88,13 @@ module.exports = {
|
|||
'IS_PRODUCTION': false,
|
||||
'LIB_VERSION': VERSION
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
test: /\.ts$/,
|
||||
sourceMap: false,
|
||||
inlineSourceMap: true,
|
||||
removeComments: true,
|
||||
module: "commonjs"
|
||||
}),
|
||||
// ignore changes during tests
|
||||
new webpack.WatchIgnorePlugin([
|
||||
/\/ReDoc$/i, // ignore change of ReDoc folder itself
|
||||
|
|
|
@ -80,11 +80,11 @@
|
|||
"source-map-loader": "^0.1.5",
|
||||
"style-loader": "^0.13.1",
|
||||
"ts-helpers": "^1.1.1",
|
||||
"tslint": "^3.15.0-dev.0",
|
||||
"tslint": "^3.15.1",
|
||||
"tslint-stylish": "^2.1.0-beta",
|
||||
"typescript": "^2.0.2",
|
||||
"webpack": "^2.1.0-beta.21",
|
||||
"webpack-dev-server": "^2.1.0-beta.2"
|
||||
"typescript": "^2.0.3",
|
||||
"webpack": "^2.1.0-beta.25",
|
||||
"webpack-dev-server": "^2.1.0-beta.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "^2.0.1",
|
||||
|
|
Loading…
Reference in New Issue
Block a user