-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed pathes
- Loading branch information
Showing
39 changed files
with
163 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ dist/bundle.js | |
*.lock | ||
*.log | ||
.vscode/ | ||
stats.json | ||
stats.json | ||
*.zip | ||
*.tar.gz |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./node_modules/.bin/webpack --config webpack.prod.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
// const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); | ||
// const LoaderOptionsPlugin = require("webpack/lib/LoaderOptionsPlugin"); | ||
|
||
function getEntrySources(sources) { | ||
if (process.env.NODE_ENV !== 'production') { | ||
sources.push('webpack-dev-server/client?http://localhost:8080'); | ||
sources.push('webpack/hot/only-dev-server'); | ||
} | ||
|
||
return sources; | ||
} | ||
|
||
module.exports = { | ||
entry: getEntrySources(['./src/index.ts']), | ||
output: { | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'bundle.js', | ||
|
||
}, | ||
cache:true, | ||
resolve: { | ||
extensions: ['.js', '.json', '.ts', '.tsx'], | ||
alias:{ | ||
src: path.resolve('./src'), | ||
assets: path.resolve('./assets') | ||
} | ||
}, | ||
module: { | ||
rules:[ | ||
{ | ||
enforce: 'pre', | ||
test: /\.tsx?$/, | ||
loader: 'tslint-loader', | ||
exclude: /(node_modules)/, | ||
}, | ||
{ | ||
test: /\.(ts|tsx)$/, | ||
// include: path.resolve(__dirname, 'src'), | ||
use:[ | ||
{ | ||
loader: "ts-loader", | ||
options: { | ||
transpileOnly: true | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
test: /\.svg$/, | ||
loader: 'svg-inline-loader' | ||
}, | ||
{ | ||
test: /\.scss$/, | ||
use: [ | ||
"style-loader", | ||
"css-loader", | ||
{ | ||
loader: "sass-loader", | ||
options:{ | ||
data: `@import "variables";`, | ||
includePaths:[ | ||
path.resolve(__dirname, "src") | ||
] | ||
} | ||
} | ||
] | ||
},{ | ||
test: /\.(png|jpe?g)$/, | ||
use: [ | ||
'file-loader', | ||
{ | ||
loader: 'image-webpack-loader', | ||
options: { | ||
bypassOnDebug:true, | ||
mozjpeg: { | ||
progressive: true, | ||
quality: 65 | ||
}, | ||
pngquant: { | ||
quality: '65-90', | ||
speed: 4 | ||
}, | ||
} | ||
}, | ||
] | ||
},{ | ||
test: /\.otf$/, | ||
loader: 'url-loader?limit=100000' | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'PRODUCTION': true, | ||
}), | ||
new ForkTsCheckerWebpackPlugin(), | ||
], | ||
}; |