File tree 8 files changed +1152
-0
lines changed
8 files changed +1152
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ dist
Original file line number Diff line number Diff line change
1
+ registry = https://registry.npmjs.org/
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " test-file-protocol" ,
3
+ "version" : " 1.0.0" ,
4
+ "main" : " src/index.js" ,
5
+ "license" : " MIT" ,
6
+ "scripts" : {
7
+ "build" : " webpack"
8
+ },
9
+ "devDependencies" : {
10
+ "css-loader" : " ^6.3.0" ,
11
+ "mini-css-extract-plugin" : " ^2.3.0" ,
12
+ "webpack" : " 5.22.0" ,
13
+ "webpack-cli" : " ^4.8.0"
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ import "./style.css" ;
Original file line number Diff line number Diff line change
1
+ body {
2
+ background-image : url (./ cat.svg);
3
+ }
Original file line number Diff line number Diff line change
1
+ const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
2
+
3
+ module . exports = {
4
+ entry : './src/index.js' ,
5
+ mode : 'production' ,
6
+
7
+ output : {
8
+ publicPath : '/assets/' ,
9
+ filename : '[name].[chunkhash].js' ,
10
+ chunkFilename : '[name].[chunkhash].js' ,
11
+ clean : true ,
12
+ } ,
13
+ module : {
14
+ rules : [
15
+ {
16
+ test : / \. c s s $ / ,
17
+ use : [
18
+ {
19
+ loader : MiniCssExtractPlugin . loader ,
20
+ } ,
21
+ 'css-loader' ,
22
+ ] ,
23
+ } ,
24
+ {
25
+ test : / \. s v g $ / ,
26
+ type : 'asset/resource' ,
27
+ } ,
28
+ ] ,
29
+ } ,
30
+ plugins : [
31
+ new MiniCssExtractPlugin ( {
32
+ filename : '[name].css' ,
33
+ } ) ,
34
+ ] ,
35
+ } ;
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments