File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ const webpackConfig = require ( '../webpack-config.js' )
2+ const path = require ( 'path' ) ;
13module . exports = {
24 "stories" : [ "../src/**/*.stories.mdx" , "../src/**/*.stories.@(js|jsx|ts|tsx)" ] ,
35 "addons" : [ "@storybook/addon-links" , "@storybook/addon-essentials" ] ,
46 "framework" : "@storybook/vue3" ,
57 core : {
68 builder : "webpack5"
9+ } ,
10+ "webpackFinal" : async ( cfg , { configType} ) => {
11+ cfg . module . rules . push ( {
12+ test : / \. ( s t y l | s t y l u s ) $ / ,
13+ use : [ 'style-loader' , 'css-loader' , 'stylus-loader' ] ,
14+ } ) ;
15+ cfg = webpackConfig ( cfg )
16+ // cfg.plugins.push(
17+ // new ESLintPlugin(options)
18+ // )
19+ // cfg.plugins.push(new ESLintPlugin({
20+ // extensions: [ 'js', 'vue' ],
21+ // fix: true,
22+ // formatter: 'stylish',
23+ // threads: false
24+ // }))
25+ return cfg ;
726 }
8- } ;
27+ } ;
Original file line number Diff line number Diff line change 1+ const path = require ( 'path' )
2+ const ESLintPlugin = require ( 'eslint-webpack-plugin' )
3+
4+ const options = {
5+ extensions : [ `js` , `vue` ] ,
6+ exclude : [
7+ 'node_modules/' ,
8+ '.storybook'
9+ ] ,
10+ fix : true ,
11+ formatter : 'stylish' ,
12+ threads : false
13+ }
14+
15+ module . exports = ( cfg ) => {
16+ cfg . module . rules . push ( {
17+ test : / \. p u g $ / ,
18+ loader : 'pug-plain-loader'
19+ } )
20+ cfg . resolve . alias = {
21+ ...cfg . resolve . alias ,
22+ '~' : path . resolve ( __dirname , 'src' )
23+ }
24+
25+ cfg . plugins . push (
26+ new ESLintPlugin ( options )
27+ )
28+
29+ return cfg
30+ }
You can’t perform that action at this time.
0 commit comments