57 строки
1.4 KiB
JavaScript
57 строки
1.4 KiB
JavaScript
const path = require('path');
|
|
const webpack = require("webpack");
|
|
|
|
module.exports = {
|
|
devtool: 'source-map',
|
|
mode: 'development',
|
|
optimization : {
|
|
concatenateModules: false,
|
|
minimize: false
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/
|
|
},
|
|
{
|
|
test: /\.json$/,
|
|
loader: 'json-loader'
|
|
},
|
|
{
|
|
test: /\.less$/,
|
|
use: [
|
|
{
|
|
loader: 'style-loader'
|
|
},
|
|
{
|
|
loader: 'css-loader'
|
|
},
|
|
{
|
|
loader: 'less-loader',
|
|
options: {
|
|
lessOptions: {
|
|
root: [path.resolve(__dirname, 'node_modules')]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
externals: {
|
|
"powerbi-visuals-api": '{}'
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js', '.css']
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, ".tmp/test")
|
|
},
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
'powerbi-visuals-api': null
|
|
})
|
|
]
|
|
}; |