Match-id-56773f8ccb7db62e98eae918795260754182b697
This commit is contained in:
parent
9ddccc81fa
commit
e6a8334612
|
@ -1,5 +1,6 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
const webpack = require('webpack');
|
||||||
|
|
||||||
// 用于 panel 页面开发
|
// 用于 panel 页面开发
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@ module.exports = {
|
||||||
path: path.join(__dirname, 'dist'),
|
path: path.join(__dirname, 'dist'),
|
||||||
filename: '[name].js'
|
filename: '[name].js'
|
||||||
},
|
},
|
||||||
|
devtool: 'source-map',
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.ts', '.tsx', '.js']
|
extensions: ['.ts', '.tsx', '.js']
|
||||||
},
|
},
|
||||||
|
@ -31,13 +33,23 @@ module.exports = {
|
||||||
"pragma": "Horizon.createElement",
|
"pragma": "Horizon.createElement",
|
||||||
"pragmaFrag": "Horizon.Fragment",
|
"pragmaFrag": "Horizon.Fragment",
|
||||||
}]],
|
}]],
|
||||||
|
plugins: ['@babel/plugin-proposal-class-properties'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.less/i,
|
test: /\.less/i,
|
||||||
use: ["style-loader", { loader: "css-loader", options: { modules: true } }, 'less-loader'],
|
use: [
|
||||||
|
"style-loader",
|
||||||
|
{
|
||||||
|
loader: "css-loader",
|
||||||
|
options: {
|
||||||
|
modules: true,
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'less-loader'],
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
|
@ -56,5 +68,9 @@ module.exports = {
|
||||||
filename: 'panel.html',
|
filename: 'panel.html',
|
||||||
template: './src/panel/panel.html'
|
template: './src/panel/panel.html'
|
||||||
}),
|
}),
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env.NODE_ENV': '"development"',
|
||||||
|
isDev: 'true',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue