Coder Social home page Coder Social logo

Comments (6)

miraage avatar miraage commented on June 4, 2024 1

@asfktz. Tested on another project. Minification works with JS, but not TS.

from autodll-webpack-plugin.

asfktz avatar asfktz commented on June 4, 2024

Hi @miraage,
Thanks for reporting!
I'll take a look at it.

from autodll-webpack-plugin.

asfktz avatar asfktz commented on June 4, 2024

@miraage can you please post your package.json too, please?

from autodll-webpack-plugin.

hylarucoder avatar hylarucoder commented on June 4, 2024

@asfktz Hey , I provider an typescript example which minification does not work

https://github.com/twocucao/YaNgAdmin

the configuration is here

https://github.com/twocucao/YaNgAdmin/blob/de89900467027b7b2a35d166fefc77e6f0c72071/config/webpack.dev.js#L181

clone this repo

yarn && npm run build:dev

123

from autodll-webpack-plugin.

spadgeaki avatar spadgeaki commented on June 4, 2024

Hi, I am trying it today and it does not work even for JS.

I used your examples/recommended project as starting point, installed autodll-webpack-plugin and changed webpack.config.js to this:

const path = require('path');
const webpack = require('webpack');
const AutoDllPlugin = require('autodll-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  entry: './src/index.js',

  output: {
    filename: '[name].bundle.js',
    path: path.resolve(__dirname, 'dist'),
    publicPath: '/'
  },

  plugins: [
    new webpack.optimize.UglifyJsPlugin(),
    new HtmlWebpackPlugin({
      inject: true,
      template: './src/index.html',
    }),
    new AutoDllPlugin({
      debug: true,
      inject: true,
      filename: '[name]_[hash].js',
      path: './dll',
      entry: {
        vendor: [
          'react',
          'react-dom',
          'moment'
        ]
      },
      plugins: [
        new webpack.optimize.UglifyJsPlugin(),
      ]
    })
  ]
};

Result is that dist/main.bundle.js is minified but dist/dll/vendor_somehash.js is not.

from autodll-webpack-plugin.

asfktz avatar asfktz commented on June 4, 2024

Hi, @spadgeaki
Fixed. See #70

@twocucao Thanks for the example, I hope to get to it soon.

from autodll-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.