@jdultra/threedtiles 8.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/webpack.config.js DELETED
@@ -1,142 +0,0 @@
1
- const path = require("path");
2
- const webpack = require("webpack");
3
- const HtmlWebpackPlugin = require("html-webpack-plugin");
4
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
5
- const TerserPlugin = require('terser-webpack-plugin');
6
- const CopyPlugin = require('copy-webpack-plugin');
7
-
8
- const sourceDir = path.resolve(__dirname);
9
- const DEFAULT_WEBPACK_PORT = 3001;
10
-
11
- module.exports = {
12
- mode: "development",
13
- entry: './src/index.js',
14
-
15
- output: {
16
- filename: "threedtiles.js",
17
- path: path.resolve(__dirname, 'dist'),
18
- globalObject: 'this',
19
- library: {
20
- name: 'threedtiles',
21
- type: 'umd',
22
- },
23
- },
24
-
25
- plugins: [
26
- new webpack.ProgressPlugin(),
27
- new HtmlWebpackPlugin({
28
- template: "index.html",
29
- filename: "index.html",
30
- }),
31
- new MiniCssExtractPlugin({
32
- filename: "[name].bundle.[hash].css"
33
- }),
34
- new CopyPlugin({
35
- patterns: [
36
- { from: "meshes", to: "meshes" }
37
- ],
38
- }),
39
- ],
40
-
41
- devtool: "source-map",
42
-
43
- module: {
44
- rules: [
45
-
46
- {
47
- test: /\.s[ac]ss$/,
48
- use: [
49
- // inserts <link/> tag to generated CSS file, inside the generated index.html
50
- { loader: MiniCssExtractPlugin.loader },
51
- "css-loader",
52
- "resolve-url-loader",
53
- // Compiles Sass to CSS
54
- {
55
- loader: "sass-loader",
56
- options: {
57
- sourceMap: true // resolve-url-loader needs sourcemaps, regardless of devtool (cf. resolve-url-loader's README)
58
- }
59
- }
60
- ]
61
- },
62
- {
63
- test: /\.css$/i,
64
- use: [
65
- { loader: MiniCssExtractPlugin.loader },
66
- "style-loader",
67
- "css-loader",
68
- ]
69
- },
70
- {
71
- test: /\.html$/i,
72
- loader: "html-loader"
73
- },
74
- { // loader for fonts
75
- test: /\.(eot|woff|woff2|otf|ttf|svg)$/,
76
- use: [{
77
- loader: "file-loader",
78
- options: {
79
- name: "fonts/[name].[ext]"
80
- }
81
- }]
82
- },
83
- { // loader for shaders
84
- test: /\.glsl$/,
85
- loader: 'webpack-glsl-loader'
86
- },
87
- {
88
- test: /\.(png|svg|jpg|jpeg|gif)$/i,
89
- type: 'asset/resource',
90
- },
91
- {
92
- test: /\.js$/,
93
- exclude: /node_modules/,
94
- use: {
95
- loader: "babel-loader",
96
- },
97
- },
98
-
99
- {
100
- test: /\.wasm$/,
101
- type: "webassembly/async",
102
- },
103
- ],
104
- },
105
- optimization: {
106
- minimizer: [new TerserPlugin({
107
- parallel: true,
108
- terserOptions: {
109
- ecma: undefined,
110
- parse: {},
111
- compress: {},
112
- mangle: true, // Note `mangle.properties` is `false` by default.
113
- module: false,
114
- // Deprecated
115
- output: null,
116
- format: null,
117
- toplevel: false,
118
- nameCache: null,
119
- ie8: false,
120
- keep_classnames: undefined,
121
- keep_fnames: false,
122
- safari10: false,
123
- },
124
- exclude: []
125
- })]
126
- },
127
- devServer: {
128
- hot: true,
129
- open: true,
130
- port: DEFAULT_WEBPACK_PORT
131
- },
132
- resolve: {
133
- extensions: [".js", ".jsx", ".json", ".ts", ".tsx"],// other stuff
134
- fallback: {
135
- "fs": false,
136
- "path": require.resolve("path-browserify")
137
- }
138
- },
139
- experiments: {
140
- asyncWebAssembly: true,
141
- },
142
- };