mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 12:14:08 -06:00
cc5d7002b0
* adds `npm start` / `yarn start` script * starts a webpack-dev-server using the dev config, served on :3333 * hot reloading (HMR) for react/styles, not working for angular code * new entry `dev.ts` for dynamic imports of CSS theme (ExtractText does not work with HMR) * TS loader pipeline moved out of common to add HMR for react * applied `hot()` to some react containers (that's their new default export, named exports remains for testing) * added sections to README * updated yarn.lock
32 lines
734 B
JavaScript
32 lines
734 B
JavaScript
const webpack = require('webpack');
|
|
const merge = require('webpack-merge');
|
|
const common = require('./webpack.common.js');
|
|
|
|
config = merge(common, {
|
|
devtool: 'cheap-module-source-map',
|
|
externals: {
|
|
'react/addons': true,
|
|
'react/lib/ExecutionEnvironment': true,
|
|
'react/lib/ReactContext': true,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
exclude: /node_modules/,
|
|
use: [
|
|
{ loader: "awesome-typescript-loader" }
|
|
]
|
|
},
|
|
]
|
|
},
|
|
plugins: [
|
|
new webpack.SourceMapDevToolPlugin({
|
|
filename: null, // if no value is provided the sourcemap is inlined
|
|
test: /\.(ts|js)($|\?)/i // process .js and .ts files only
|
|
}),
|
|
]
|
|
});
|
|
|
|
module.exports = config;
|