up bootstrap

This commit is contained in:
Andrey Vlasov
2020-02-29 16:47:16 +03:00
parent 3e2695801d
commit 88a38bc75e
19 changed files with 300 additions and 1614 deletions
+13 -20
View File
@@ -5,30 +5,24 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const outputDirectory = 'dist';
const pkg = require('./package.json')
module.exports = {
mode: 'development',
mode: "development",
entry: {
bootstrap: ['./src/main.js']
index: "./src/main.ts"
},
output: {
filename: '[name].js',
library: "bootstrap",
path: path.resolve(__dirname, outputDirectory),
globalObject: `(typeof self !== 'undefined' ? self : this)`
libraryExport: "default",
publicPath: `/boorstrap/${pkg.version}/`
},
node: {
fs: 'empty'
},
plugins: [
new CleanWebpackPlugin(),
new webpack.DefinePlugin({
'typeof window': JSON.stringify('object')
})
],
devtool: '#source-map',
//devtool: 'none',
plugins: [new CleanWebpackPlugin()],
resolve: {
modules: ['node_modules', 'src'],
extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js', '.css']
extensions: [".jsx", ".js"]
},
module: {
@@ -36,13 +30,12 @@ module.exports = {
{ parser: { system: false } },
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
loader: "awesome-typescript-loader"
},
{
test: /\.(jpe?g|gif|png|svg|woff|ttf|eot|wav|mp3)$/,
loader: 'file-loader'
loader: "file-loader"
}
]
}
};