update Webpack to 2.2
This commit is contained in:
parent
c5441923f7
commit
75d203c478
4 changed files with 15 additions and 17 deletions
|
@ -77,7 +77,7 @@ RUN chmod +x /usr/local/bin/jwtproxy
|
|||
RUN curl -L -o /usr/local/bin/prometheus-aggregator https://github.com/coreos/prometheus-aggregator/releases/download/v0.0.1-alpha/prometheus-aggregator
|
||||
RUN chmod +x /usr/local/bin/prometheus-aggregator
|
||||
|
||||
# Install Webpack, Typescript, React
|
||||
# Install Webpack, Typescript
|
||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||
ADD package.json package.json
|
||||
ADD tsconfig.json tsconfig.json
|
||||
|
@ -88,11 +88,9 @@ RUN npm link typescript
|
|||
|
||||
# Add static files
|
||||
ADD static static
|
||||
ADD static/js/directives/components static/dist/components
|
||||
|
||||
# Run Webpack
|
||||
RUN npm install -g webpack
|
||||
RUN webpack
|
||||
RUN node_modules/.bin/webpack --progress
|
||||
|
||||
# Run front-end tests
|
||||
ARG RUN_TESTS=true
|
||||
|
|
|
@ -59,6 +59,6 @@
|
|||
"ts-loader": "0.9.5",
|
||||
"typescript": "2.0.3",
|
||||
"typings": "1.4.0",
|
||||
"webpack": "1.13.3"
|
||||
"webpack": "^2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class body extends React.Component<IBody, IBodyState> {
|
|||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
let intervalId: number = setInterval(() => this.getBuilds(), 1000);
|
||||
let intervalId: number = window.setInterval(() => this.getBuilds(), 1000);
|
||||
this.setState({
|
||||
currentBuild: this.state.currentBuild,
|
||||
intervalId: intervalId
|
||||
|
|
|
@ -8,17 +8,17 @@ var config = {
|
|||
filename: "bundle.js"
|
||||
},
|
||||
resolve: {
|
||||
extensions: ["", ".ts", ".tsx", ".js", ".scss"],
|
||||
extensions: [".ts", ".tsx", ".js", ".scss"],
|
||||
alias: {
|
||||
"sass": path.resolve('./static/css/directives/components/pages/')
|
||||
sass: path.resolve(__dirname, 'static/css/directives/components/pages/')
|
||||
}
|
||||
},
|
||||
// Use window.angular to maintain compatibility with non-Webpack components
|
||||
externals: {
|
||||
"angular": "angular",
|
||||
angular: "angular",
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
loader: "ts-loader",
|
||||
|
@ -26,13 +26,13 @@ var config = {
|
|||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loaders: ['style', 'css', 'sass'],
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader",
|
||||
"sass-loader",
|
||||
],
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /angular\.js$/,
|
||||
loader: 'expose?angular',
|
||||
}
|
||||
]
|
||||
},
|
||||
devtool: "source-map",
|
||||
|
|
Reference in a new issue