|
@@ -1,42 +1,14 @@
|
|
|
-const path = require('path');
|
|
|
-const webpack = require('webpack');
|
|
|
-const babylonExternals = require('../Tools/WebpackPlugins/babylonExternals');
|
|
|
-const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
|
-const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
|
|
+const babylonWebpackConfig = require('../Tools/WebpackPlugins/babylonWebpackConfig');
|
|
|
|
|
|
-module.exports = {
|
|
|
- context: path.resolve(__dirname, './src'),
|
|
|
- entry: {
|
|
|
- 'babylonjs-inspector': path.resolve(__dirname, './src/legacy/legacy.ts'),
|
|
|
- },
|
|
|
- output: {
|
|
|
- path: path.resolve(__dirname, '../dist/preview release/inspector'),
|
|
|
- filename: 'babylon.inspector.bundle.js',
|
|
|
- libraryTarget: 'umd',
|
|
|
- library: {
|
|
|
- root: "INSPECTOR",
|
|
|
- amd: "babylonjs-inspector",
|
|
|
- commonjs: "babylonjs-inspector"
|
|
|
- },
|
|
|
- umdNamedDefine: true
|
|
|
- },
|
|
|
+var config = babylonWebpackConfig({
|
|
|
+ module: "inspector",
|
|
|
resolve: {
|
|
|
extensions: [".js", '.ts', ".tsx"],
|
|
|
alias: {
|
|
|
"re-resizable$": path.resolve(__dirname, '../node_modules/re-resizable/lib/index.es5.js')
|
|
|
}
|
|
|
},
|
|
|
- externals: [babylonExternals()],
|
|
|
- devtool: "source-map",
|
|
|
- module: {
|
|
|
- rules: [{
|
|
|
- test: /\.tsx?$/,
|
|
|
- loader: 'awesome-typescript-loader',
|
|
|
- options: {
|
|
|
- configFileName: path.resolve(__dirname, './tsconfig.json'),
|
|
|
- declaration: false
|
|
|
- }
|
|
|
- },
|
|
|
+ moduleRules: [
|
|
|
{
|
|
|
test: /\.scss$/,
|
|
|
use: [
|
|
@@ -49,18 +21,8 @@ module.exports = {
|
|
|
{
|
|
|
test: /\.css$/,
|
|
|
use: ['style-loader', 'css-loader']
|
|
|
- }]
|
|
|
- },
|
|
|
- mode: "production",
|
|
|
- performance: {
|
|
|
- hints: false
|
|
|
- },
|
|
|
+ }],
|
|
|
plugins: [
|
|
|
- new HardSourceWebpackPlugin(),
|
|
|
- new webpack.WatchIgnorePlugin([
|
|
|
- /\.js$/,
|
|
|
- /\.d\.ts$/
|
|
|
- ]),
|
|
|
new MiniCssExtractPlugin({
|
|
|
// Options similar to the same options in webpackOptions.output
|
|
|
// both options are optional
|
|
@@ -68,4 +30,6 @@ module.exports = {
|
|
|
chunkFilename: "[id].css"
|
|
|
})
|
|
|
]
|
|
|
-}
|
|
|
+});
|
|
|
+
|
|
|
+module.exports = config;
|