C
C
cyberlain2018-04-05 13:58:53
webpack
cyberlain, 2018-04-05 13:58:53

How to rewrite webpack config?

I took the finished assembly and decided to finish it. Here is the webpack.config.js config . Everything works as it should, when building the project, we get html and js css folders and so on, but I decided to change a little and add all the statics (css js fonts) to a separate assets folder, and leave the html as it is now in the root. What would you recommend to rewrite? (I don’t know webpack)
As if I understand that this piece

{
        test: /\.pug$/,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: '[path][name].html',
              context: src.pug
            }
          },
          'extract-loader',
          { loader: 'html-loader', options: { interpolate: true } },
          {
            loader: 'pug-html-loader',
            options: {
              pretty: true,
              exports: false,
              doctype: 'html',
              basedir: src.pug,
              data: {
                data: () => JSON.parse(fs.readFileSync(path.resolve(src.pug, 'data/global.json'), 'utf8'))
              },
              filters: {
                // filter for include json data as empty string
                'json-watch': () => ''
              }
            }
          }
        ]
      }

но что именно?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question