File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 8
8
# Ignore Rush temporary files
9
9
/common /temp /**
10
10
11
- ** /webpack.config.js
11
+ # **/webpack.config.js
12
12
.rpt2_cache
13
13
_src
14
14
coverage
Original file line number Diff line number Diff line change
1
+ const path = require ( "path" ) ;
2
+ // Plugins
3
+ const webpackBuilder = require ( "@reactway/webpack-builder" ) ;
4
+ const typeScript = require ( "@reactway/webpack-builder-plugin-typescript" ) ;
5
+ const webpackDevServer = require ( "@reactway/webpack-builder-plugin-web-dev" ) ;
6
+ const htmlPlugin = require ( "@reactway/webpack-builder-plugin-html" ) ;
7
+ const styles = require ( "@reactway/webpack-builder-plugin-styles" ) ;
8
+ const images = require ( "@reactway/webpack-builder-plugin-images" ) ;
9
+ const clean = require ( "@reactway/webpack-builder-plugin-clean" ) ;
10
+ const writeFile = require ( "@reactway/webpack-builder-plugin-write-file" ) ;
11
+ // Packages not included to plugins.
12
+ // const CopyPlugin = require("copy-webpack-plugin");
13
+
14
+ const fullOutputPath = path . resolve ( __dirname , "dist" ) ;
15
+
16
+ module . exports = new webpackBuilder . Builder ( __dirname , {
17
+ entry : "./src/app.tsx" ,
18
+ mode : "development" ,
19
+ output : {
20
+ path : fullOutputPath ,
21
+ filename : "[name].bundle.js"
22
+ }
23
+ } )
24
+ . use ( typeScript . TypeScriptPlugin )
25
+ . use ( webpackDevServer )
26
+ . use ( htmlPlugin )
27
+ . use ( styles . StylesPlugin )
28
+ . use ( images )
29
+ . use ( clean )
30
+ . use ( writeFile )
31
+ // .update(webpack => {
32
+ // webpack.plugins.push(new CopyPlugin([{ from: "src/assets/", to: "./assets" }]));
33
+ // return webpack;
34
+ // })
35
+ . toConfig ( ) ;
You can’t perform that action at this time.
0 commit comments